In this program, you will learn to convert temperature from Celsius to Fahrenheit. The formula for Celsius to Fahrenheit conversion is given below: F = C × 9/5 + 32 OR F = C × 1.8 + 32
#include<stdio.h>
void main()
{
float celsius, fahrenheit;
printf("Please enter temperature in Celsius: ");
scanf("%f", &celsius);
fahrenheit = (1.8 * celsius) + 32;
printf("Temperature in Fahrenheit = %0.1f\n", fahrenheit);
getch();
}
Please enter temperature in Celsius: 32
Temperature in Fahrenheit = 89.6