C Program to Convert Fahrenheit to Celsius

In this example, we will learn how to change Fahrenheit to Celsius. For this we use following formula

C Program to Convert Fahrenheit to Celsius

Program to Convert Fahrenheit to Celsius in C

#include<stdio.h>
void main()
{
  float c,f;
  printf("Enter temperature in Fahrenheit : ");
  scanf("%f",&f);
  c = (f-32)/1.8;
  printf("%.2f degree Fah. is = %.2f degree Celsius",f,c);
}

Output

Enter temperature in Fahrenheit : 100
100.00 degree Fah. is = 37.78 degree Celsius
Share in a Single Click

Leave a Reply

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