C Program to convert Fahrenheit to Celsius

 

In this post we are going to write a C program to convert Fahrenheit to Celsius.

This is the formula to find Celsius from Fahrenheit:

 °C = (°F  –  32)  x  5/9

°C – Celsius
°F – Fahrenheit

It’s a very simple formula, all you have to do is get the Fahrenheit as Input writing a c program and just write the formula as show above.

Lets write:

#include<stdio.h>
 
int main()
{
    float fahrenheit, celsius;
    
    //get the limit of fibonacci series    
    printf("Enter Fahrenheit: \n");
    scanf("%f",&fahrenheit);
    
    celsius = (fahrenheit - 32)*5/9;
    
    printf("Celsius: %f \n", celsius);
	    
    return 0;
}

This is it, the output of the program would be,

Enter Fahrenheit:
100
Celsius: 37.777779

 

Hope this post helped someone, Good Luck!

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top