Skip to content
Home » Fahrenheit to Celsius C Program

Fahrenheit to Celsius C Program

Learn about Fahrenheit to Celsius C Program in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.

Fahrenheit to Celsius C Program

Program:

#include<stdio.h>
int main()
{
   float cel, fahr;

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

   cel = ((5.0/9.0) * (fahr - 32)) ;

   printf("Celsius value = %.2f\n", cel);

   return 0;
}

Output:

Enter Fahrenheit value: 96
Celsius value = 35.56

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Codes :
Celsius to Fahrenheit C program using For loop
C Program to Convert Celsius to Fahrenheit In a Range