Monday, 17 August 2015

Convert Fahrenheit to Celsius

/*C program to convert Fahrenheit to Celsius*/
/*Formula(Fahrenheit to Celsius):
Celsius = (Fahrenheit - 32) / 1.8
*/
#include<stdio.h>
#include<conio.h>
int main()
{
 float fh,cl;
 printf("Enter temperature value in Fahrenheit: ");
 scanf("%f"&fh);
 cl = (fh - 32) / 1.8;
 printf("Converted Celsius value: %f",cl);
 getch();
 return 0;
}

No comments:

Post a Comment