Saturday, 10 December 2011

Write a program to Fahrenheit temperature to convert in degree Celsius in c

#include
#include
main()
{
float ftemp,ctemp;
clrscr();
printf("The Temperature in Fahrenheit :-");
scanf("%f",&ftemp);
ctemp=5*(ftemp-32)/9;
printf("The Temperature in Degree Celsius is:-%f",ctemp);
getch();
}


OUTPUT
The Temperature in Fahrenheit:98.4
The Temperature in Degree Celsius is:36.888889

No comments:

Post a Comment