I am trying to use a function to convert from Fahrenheit to Celsius. I wish to know where I made a mistake.
#include <stdio.h>
void degrees_Fto_C(float f){
float c;
c=(5/9)*(fâ(32));
printf("%f",c);
}
int main(){
float temp;
printf("Enter the temperature in Fahrenheit: \n");
scanf("%f",&temp);
degrees_Fto_C(temp);
return 0;
}
The error message is:
C:\Users\Pranavs\Desktop\Untitled1.cpp In function 'void degrees_Fto_C(float)':
C:\Users\Pranavs\Desktop\Untitled1.cpp [Error] 'f' cannot be used as a function