Hi!
I'm trying to create and call a function which converts Fahrenheit to Celsius; here's my code:
When I compile and run, the program outputs nothing. Could someone tell me what's wrong with it please?Code:#include <stdio.h>
int fahrenheit_to_celsius(int f);
int main()
{
printf(fahrenheit_to_celsius(5));
return 0;
}
int fahrenheit_to_celsius(int f)
{
int c;
c = 5 * (f-32) / 9;
return c;
}
Thanks!