Exercise: Fahrenheit to Celsius

Write code to solve the problem.

Question

Write a program that converts temperature in degrees Fahrenheit to degrees Celsius using the following formula:

C=(F32)1.8C=\frac{(F-32)}{1.8}

Assume that the temperature in degrees Fahrenheit is given to you in the variable degF, and the converted value is to be stored in the variable degC. Try solving it here:

Exercise: Fahrenheit to Celsius

Write code to solve the problem.

Question

Write a program that converts temperature in degrees Fahrenheit to degrees Celsius using the following formula:

C=(F32)1.8C=\frac{(F-32)}{1.8}

Assume that the temperature in degrees Fahrenheit is given to you in the variable degF, and the converted value is to be stored in the variable degC. Try solving it here:

C
#include <stdio.h>
double degF_to_degC(double degF)
{
double degC;
// Write your code below and put your conversion in degC
return degC;
}
int main()
{
// Call to degF_to_degC()
}