logo image

C Language program to convert fahrenheit to celsius

31


Following program shows you how to convert fahrenheit to celsius. In this program we get fahrenheit temperature from user and convert that fahrenheit temperature into celsius using following formula Celsius = (fahrenheit - 32) * 5 / 9

#include <stdio.h>

int main(void) {
	float temperature;

	printf("Please enter temperature in fahrenheit:");
	scanf("%f", &temperature);

	float celsius = (temperature - 32) * 5 / 9;

	printf("Temperature in celsius: %f", celsius);
}

Output:

Please enter temperature in fahrenheit: 44
Temperature in celsius: 6.666667