# C program to convert temperature from degree celsius to fahrenheit

## C program to convert temperature from degree celsius to fahrenheit

Below I shared C program to convert temperature from degree celsius to fahrenheit By using
mathematical formula behind the temperature conversion from degree Fahrenheit to Celsius in C is: Celsius = (5 / 9) * (Fahrenheit – 32)

For example, if a user enters the temperature in Fahrenheit 76 and in Celcius 37 then the output will be:

Enter the temperature in Fahrenheit: 76
The temperature 76.000000 in Fahrenheit is 9.800000 in Celcius
Enter the temperature in Celcius: 37
The temperature 37.000000 in Celcius is 98.599998 in Fahrenheit

``````
#include<stdio.h>
int main()
{
float fah,rcen,cen,rfah;
printf("\n Enter the temperature in fahrenheit ");
scanf("%f",&fah);
rcen=(0.55*fah)-32.0;
printf("\n The temperature %f in fahrenheit is %f in celcius",fah,rcen);
printf("\n Enter the temperature in celcius ");
scanf("%f",&cen);
rfah=(1.8*cen)+32.0;
printf("\n The temperature %f in celcius is %f in fahrenheit",cen,rfah);
return 0;
}
``````

NOTE: You have any problem in above C program to convert temperature from degree celsius to fahrenheit do not hesitate and write your problem in the comment box. I will support your problem.