C program to convert temperature from degree Celsius to Fahrenheit
Posted by Samath
Last Updated: January 02, 2017

Write a C program to input temperature in Celsius (centigrade) from user and convert to Fahrenheit. The formula to convert temperature from degree Celsius to degree Fahrenheit is:

°F = (°C * 9) / 5 + 32

Code:

#include<stdio.h>
 
int main() {
 float celsius, fahrenheit;
 
 printf("\nEnter Temperature in Celsius : ");
 scanf("%f", &celsius);
 
 fahrenheit = (1.8 * celsius) + 32;
 printf("\nTemperature in Fahrenheit is : %f ", fahrenheit);
 
 return (0);
}