Centigrade temperature converts to Fahrenheit Program in C

Previous
Next

Input

          Enter temperature in Celsius = 100

Output

          Temperature in Fahrenheit = 212 F

Temperature conversion formula:

#include <stdio.h>
int main()
{
	float celsius, fahrenheit;
	
	printf("Enter temperature in Celsius : ");
	scanf("%f", &celsius);
	
	fahrenheit = (celsius * 9 / 5) + 32;
	printf("%.2f Celsius = %.2f Fahrenheit", celsius, fahrenheit);
	return 0;
}
Previous
Next

Add Comment

Courses Enquiry Form