Wednesday 28 March 2012


TO CONVERT TEMPERATURE IN DEGREE CELSIUS TO FAHRENHEIT




To accept a temperature in degree Celsius(c) and to display it in degree fahrenheit(f) using the formula f=9.0/5.0*c+32
#include<stdio.h>
Void main()
{
float Celsius,fahrenheit;
clrscr();
printf(“enter temperature in degree Celsius:”);
scanf(“%f”,&celsius);
Fahrenheit=(9.0/5)*Celsius+32;
printf(“%g degree Celsius is %g fahrenheit”,elsius,fahrenheit);
Getch();
}



No comments:

Post a Comment