General Programming Write a program that converts the temper

  1. [General Programming] Write a program that converts the temperature F in Farenheit to C in Celsius using C = (F-32)*5/9. For ease of programming you can display the result in fractions, i.e. C = 20 1/9 (no need to use floats, just display the quotient, the slash character and the digit 9). Show the runs for freezing, boiling point, room temperature and human body temperature.   Provide screen shots of the runs along with your program.  

Solution

float c = 0.0 ,f = 0.0; for (f = 32.0; f <=212.0; f++ ) { c = (5/9)*(f-32); printf (\"%g\\t\", c); } for (c = 0.0; c <= 100; c++) { f = (9/5)*c+32; printf (\"%g\\t\", f); }

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site