Pages

Tuesday, January 14, 2014

[H]. (d) Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature the keyboard. Write a program to convert this temperature into Centigrade degrees.

void main()
{
 float f, c;
 clrscr();
 printf("Enter Temperature in Fahrenheit : ");
 scanf("%f",&f);
 c=(f-32)*5/9;
 printf("\n%f Fahrenheit = %f Centigrade",f,c);
 getch();
}

No comments:

Post a Comment