Home > Back-end >  The couple, simple
The couple, simple

Time:10-24

The couple consult
# include "stdafx. H"
# include
# include
using namespace std;
Int main ()
{
Double F, c;
coutcout<" Enter a Fahrenheit temperature: "& lt; cin> F;
C=5/9 * (F - 32);
cout<" Celsius is: "& lt; return 0;
}
Why no matter what the input, the result is 0.00

CodePudding user response:

Into a * c=5.0/9.0 (F - 32);

CodePudding user response:

 c=5/9 * (F - 32); 

Change
 c=5.0/9 * (F - 32); 

CodePudding user response:

Reason is that 5/9 is calculated according to the division integer, so 5/9=0