I would like you to write a C Program to convert user input of the temperature i
ID: 3649428 • Letter: I
Question
I would like you to write a C Program to convert user input of the temperature in Fahrenheit to Celcius, Rankin(e), and Kelvininclude <stdio.h> //for printf and scanf
int main()
{
// Declare variables
double celsius, fahrenheit;
// Input
printf("Please enter a temperature in Fahrenheit: ");
scanf("%lf", &fahrenheit); // Read input from user, store in
// fahrenheit
fflush(stdin); // Flush input buffer
// Calculation
celsius = (5.0/9.0) * (fahrenheit - 32); // We must use 5.0
// because we are playing with floating point
// numbers and don't want to do integer division.
// Output
printf("%4.1f degrees fahrenheit = %4.1f degrees celsius ", fahrenheit, celsius); // Variables are given from left to right
getchar(); // For those icky windows compilers
return 0;
}