Pages

Friday, 18 May 2012

program to Fahrenheit temperature to convert in degree Celsius


12./*Write a program to Fahrenheit temperature to convert in degree Celsius*/

#include<stdio.h>
#include<conio.h>
main()
{
float ftemp,ctemp;
clrscr();
printf("The Temperature in Fahrenheit :-");
scanf("%f",&ftemp);
ctemp=5*(ftemp-32)/9;
printf("The Temperature in Degree Celsius is:-%f",ctemp);
getch();
}


OUTPUT
            The Temperature in Fahrenheit:98.4
            The Temperature in Degree Celsius is:36.888889

No comments:

Post a Comment