+ 1
Double calculation always result in 32.00000
I was trying to convert Centrigrade Temperatures into Fahrenheit. The formula is tempc *(9.0/5.0)+32 Tempc is a double value. But whatever I put in for tempc the result is always the same, namely 32 because the multiplication part evaluates to 0. Why? Any help?
2 Respuestas
+ 1
I'm getting the right answer :
#include <iostream>
using namespace std;
int main() {
double temp = 37 *(9.0/5.0)+32;
cout<<temp;
return 0;
}
0
Well that's strange