That's the error message I get when I try to compile this program. Is there something wrong with my functions or how I'm calling them?
Code:
#include <stdio.h>
float celsius(float);
float fahrenheit(float);
int main()
{
float celsius, fahrenheit;
printf("%10s%10s", "celsius", "fahrenheit");
for (celsius = 0; celsius <= 100; ++celsius)
printf("%10.2f%10.2f\n", celsius, fahrenheit( celsius ) );
printf("\n\n\n");
for (fahrenheit = 32; fahrenheit <= 212; ++fahrenheit)
printf("%10.2f%10.2f\n", fahrenheit, celsius(fahrenheit) );
printf("\n");
return 0;
}
float celsius (float fahrenheit)
{
float celsius;
celsius = (fahrenheit - 32) / 1.8;
return celsius;
}
float fahrenheit (float celsius)
{
return (celsius * 9 / 5) + 32;
}