C Program to convert Celcius to Fahrenheit
User enters integer value for variable 'celsius', convert Celsius to Fahrenheit with the below formula $$fahrenheit = (1.8 * celsius) + 32$$ The value stored at variable 'Fahrenheit' is printed on the console.
Program
#include<stdio.h>
int main()
{
float celsius, fahrenheit;
printf("Enter temperature in Celsius:\t");
scanf("%f", &celsius);
fahrenheit = (1.8 * celsius) + 32;
printf("Temperature in Fahrenheit: %f\n", fahrenheit);
}
Output
Enter temperature in Celsius: 32
Temperature in Fahrenheit: 89.599998