Question: (1)You write a method to convert a Fahrenheit temperature to degrees Celsius. Your code looks like this: double centigrade, fahrenheit; fahrenheit = 50.0; centigrade =
(1)You write a method to convert a Fahrenheit temperature to degrees Celsius. Your code looks like this:
double centigrade, fahrenheit;
fahrenheit = 50.0;
centigrade = (fahrenheit - 32)*(5/9) ;
The equation is correct, in a mathematical sense. The output is not exactly what you want.
Why is the output incorrect? Fix the code so that it works, and explain in detail why the version above does not work.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
