Tuesday, 14 May 2013

9. Program to convert temperature Fahrenheit into Celsius


9. /* Program to convert temperature Fahrenheit into Celsius */
/* degree c=5/9*(f-32) */
/* c-Celsius & f-Fahrenheit */
main()
{
float c,f;
clrscr();
printf("Enter the temperature in Fahrenheit ");
scanf("%f",&f);
c=5.0/9.0*(f-32.0);
printf("\nTemperature in Celsius is %f \n",c);
getch();
}

No comments:

Post a Comment