c program to convert temperature into celsius


Program to convert given Temperature in Fahrenheit to Celsius, using Function
Program
# include <stdio.h>
void main()
{
float f;
float Celsius(float f);
printf("\nEnter the Temperature in Fahrenheit : ");
scanf("%f", &f);
printf("\nThe %0.2f Fahrenheit = %0.2f Celsius.", f, Celsius(f));
}
float Celsius(float f)
{
return(5 * (f - 32) / 9);
}

No comments: