In this example, we will learn how to change Fahrenheit to Celsius. For this we use following formula
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
Introduction of C and Hello World Program
C program to Addition of two numbers
C program to find Area of Triangle
C program to find Area of Circle
C program to find Area of Rectangle
C program to Calculate Simple Interest
C program to Calculate Compound Interest
C program to Swap two Numbers