C Program for Temperature Conversion
Algorithm:-
1.Start
2.Accept the temperature in Fahrenheit
3.Calculate in Celsius by,
C=5*(f-32)/9
4.Print temperature in Celsius
5.Accept temperature in Celsius
6. Caluclate in Fahrenheit by,
F=9*c/5+32
7.Print temperate in Fahrenheit
Program:-
/*Temperature conversion program - Crazy Factzz */
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float f,c;
printf("\n Enter the temperature in Fahrenheit \n");
scanf("%f",&f);
c=5*(f-32)/9;
printf("Temperature in Celsius = %5.2f C ",c);
printf("\n Enter the temperature in Celsius \n");
scanf("%f",&c);
f=9*c/5+32;
printf("Temperature in Farenheit = %5.2f C ",c);
getch();
}
For more C programs - click here