Originally posted by singularity2006
it’s still not working… very lost. HEre’s the complete code. I even tried: (float)degF = (float)degC * (float)1.8 + (float)32 … it still assigns 0 to degF… what is going on??
For starters your code is hard to read even though it’s only a few lines. You are re-using variables names in the functions that you have already defined as global (and are thus confusing and in a large project would be extremely confusing). Also, you define prototypes of functions but you omit the function spec (the parameters). These should at least look like:
float celcius_to_fahrenheit(float);
int print_fahrenheit(float);
I am surprised your compiler allows you to even compile that without throwing you errors or warnings.
The functions celcius_to_fahrenheit and print_fahrenheit have a rather odd construct in using the global variable definition as a parameter spec. Again, your compiler should have thrown a fit over something like that. Try writing them like:
float celcius_to_fahrenheit(float value)
int print_fahrenheit(float value)
…and make sure you replace the reference to ‘value’ as well of course or else it won’t work and you’ll have structural problems.
But what surprises me most of all is that your compiler isn’t warning you that the “degF = value * 1.8 + 32.0;” is a conversion from double to float and thus could result in a precision loss. Try writing them as floats like this:
degF = value * 1.8F + 32.0F;
That should take care of the conversion which your compiler seems to be having a problem with.
I’m not sure what to say but I would suggest using a different compiler because the one you are using must be a piece of… (fill in the blank). 
But seriously… if you are going to learn programming and I see these kinds of problems you are running into, which clearly should have been caught by the compiler at some level, then I have to strongly suggest using a compiler that at least does a decent job because right now your compiler is causing you these frustrations.
The abbreviated version below runs just fine. Try putting it through your compiler and see what it does.
#include <stdio.h>
int main(int argc, char* argv[])
{
float degC;
float degF;
printf("Please input a temperature value in degrees Celcius: ");
scanf("%f", °C);
degF = degC * 1.8F + 32.0F;
printf("
Converts to %.2f degrees Fahrenheit
", degF);
return 0;
}