#include
float temp(float fah); //function temp calculates input fahrenheit to Celsius fah is formal parameter
int main(void)
{
float far; // here far is actual parameter whose value is stored in fah formal parameter ,so far => fah
printf("Enter temperature in Fahrenheit : ");
scanf("%f",&far);
printf("\nTemperature in Celcius is %f",temp(far));
return 0;
}
float temp(float fah)
{
return ( 5 * ( fah - 32))/9;
}
No comments:
Post a Comment