Saturday, December 4, 2010

Simple C Programs 1. to convert temperature in Degree Celcius and Degree Kelvin

/* C program to accept the temperature in Fahrenheit and convert it into degree Celsius and degree Kelvin*/

#include"stdio.h"
main()
{
float t,a,c,b;
printf("Enter the Temperature in Fahrenheit: \n");
scanf("%f",&a);

/* C is temp in degree Celsius and t in Kelvin*/

c=0.55*(a-32);
t=C+273.15;

printf("/n temperature in degree Celsius is :%f",c);

printf("/n temperature in degree Kelvin is : %f",t);
}

--------------------------------------


this was the program to convert it.
Thanks,
Tushar Khoje




Download RealPlayer for FREE

No comments:

Post a Comment