Tuesday, April 30, 2013

c Program to Convert Temperature from Degree Centigrade to Fahrenheit


/*
Program to Convert Temperature from Degree Centigrade to Fahrenheit
f = (1.8*c) + 32
*/
#include <stdio.h>
main()
{
float c, f;
printf("\nEnter temperature in degree Centigrade: ");
scanf("%f", &c);
f = (1.8*c) + 32;
printf("\n\nTemperature in degree Fahrenheit: %.2f", f);
getch();
}

This is a simple program.you just care about the formula ' f = (1.8*c) + 32' and input the 'c' value.

No comments:

Post a Comment