I have a problem
I have to convert temperature between farenhiet and celsius.
here is my code
my problem is that i get the wrong results. When i enter 5 i should be getting -15.0 but instead i get 1120.0. Can someone help me.
int main ()
printf("Please enter a fahrenheit temperature ");
check = scanf("%f", &temp);
if (check != 1)
temp = (temp - 32.0) * 5.0 / 9.0;
printf("\nTemperature converted to celsius = %.1f\n", temp);