C Program to Convert from Fahrenheit to Celsius

Write a Program to Convert from Fahrenheit to Celsius

// C Program to Convert from Fahrenheit to Celsius

#include <stdio.h>

int main()
{
    float fahr, cel;

    printf("Enter Fahrenheit :--> ");
    scanf("%f", &fahr);

    cel = (fahr - 32) * 5 / 9;  //formula to convert

    printf("\nTemperature in Celsius : %0.2f \n", cel);

    return 0;

}

Output:

Enter Fahrenheit :--> 40

Temperature in Celsius : 4.44

≪ Previous | Next ≫