Need this program written in C code Not C or C Write a progr
Solution
#include <stdio.h>
int main()
{
int Fahrenheit;
double Celsius;
printf(\"Enter the temperature in degree Fahrenheit: \");
scanf(\"%d\", &Fahrenheit);
Celsius = (5 * (Fahrenheit - 32)) / (double)9;
printf(\"Celsius = %lf\ \", Celsius);
return 0;
}
Output:
sh-4.2$ gcc -o main *.c
sh-4.2$ main
Enter the temperature in degree Fahrenheit: 31
Celsius = -0.555556
sh-4.2$ gcc -o main *.c
sh-4.2$ main
Enter the temperature in degree Fahrenheit: 50
Celsius = 10.000000
