#include #include int main(int argc, char** argv) { double C; double F; printf("Enter temp in degrees Celcius: "); scanf("%lf", &C); F = 9/5*C + 32; // wrong result due to integer division //F = C*9/5 + 32; // correct (v. 1) //F = 9.0/5.0*C + 32; // correct (v. 2) //F = ((double) 9)/5*C +32; // correct (v. 3) printf("In Fahrenheit this is %f \n", F); system("pause"); }