Write a C program that will convert temperature from Fahrenh
Write a \"C\" program that will convert temperature from Fahrenheit to Celsius and display output on screen #include int main(void) {double tempc;/* temperature in Celsius */double tempf;/* temperature in Fahrenheit */printf(\"Enter value of temp in Celsius: \"); scanf (u#/
Solution
/* C Program to convert temperature from Fahrenheit to Celsius and vice versa.*/
#include <stdio.h>
int main()
{
double tempc;
double tempf;
printf(\"Enter the value of temperature in Fahrenheit\ \");
scanf(\"%lf\",&tempf);
printf(\"\ Value of temperature in fahrenheit is %lf \ \",tempf);
tempc= (tempf - 32) / 1.8;
printf(\"Temperature in Celsius: %.2lf \ \",tempc);
return 0;
}
