I am very new to C, so I apologise if this is a really stupid question.
I'm trying to read a character input from the keyboard (F or C) and if the response is F calculate from Fahrenheit to Celcius, else calculate from Celcius to Fahrenheit.
But I keep getting an error (using Visual Studio 2005)
Is the problem something to do with char/string cannot use = or == ... or am I missing something simple.
error C2065: 'f' : undeclared identifier
Any help appreciated.
printf("Please enter the temperature: ");
printf("F to C (enter f) or C to F (enter c): ");
if (Conversion == f)
degC = (degEntered - 32) / 1.8;
printf("It is %5.2f degrees C",degC);
degF = 1.8 * degEntered + 32;
printf("It is %5.2f degrees F",degF);