Write a program to convert Fahrenheit to Celsius program in c.
#include<stdio.h>
#include<conio.h>
void main()
{
float Fahrenheit, Celsius;
clrscr();
printf("Enter the temperature in Fahrenheit: ");
scanf("%f",&Fahrenheit);
Celsius=((5.0/9.0)*Fahrenheit-32.0);
printf("Fahrenheit temperature %f is converted into %f Celsius",Fahrenheit,Celsius);
getch();
}
Output:
Enter the temperature in Fahrenheit: 32
Fahrenheit temperature 32.000000 is converted into -14.222222 Celsius
No comments: