C Program to Convert Temperature from Celsius to Fahrenheit

In this program, you will learn to convert temperature from Celsius to Fahrenheit. The formula for Celsius to Fahrenheit conversion is given below: F = C × 9/5 + 32 OR F = C × 1.8 + 32



Source Code
#include<stdio.h>
void main()
{
    float celsius, fahrenheit;
    printf("Please enter temperature in Celsius: ");
    scanf("%f", &celsius);

    fahrenheit = (1.8 * celsius) + 32;
    printf("Temperature in Fahrenheit = %0.1f\n", fahrenheit);
    getch();
}
Output
Please enter temperature in Celsius: 32
Temperature in Fahrenheit = 89.6