Question: Write a program that allows a user to convert a temperature given in degrees from either Celsius to Fahrenheit or Fahrenheit to Celsius. Use the
Write a program that allows a user to convert a temperature given in degrees from either Celsius to Fahrenheit or Fahrenheit to Celsius. Use the following formulas:
DegreesC = 5(DegreesF 32)/9
DegreesF=(9(DegreesC)/5) + 32)
Prompt the user for a temperature and either a C or c for Celsius or an F or f for Fahrenheit. Convert the temperature to Fahrenheit if either C or c is entered (meaning the user gave you the temperature in Celsius), or to Celsius if either f or F is entered ( because the user gave you the temperature in Fahrenheit). Display the temperature with at most two places after the decimal point. (Convert whatever temperature the user gives you, even if it is a very high positive number or a very low negative one).
Test your output is correct by finding a temperature converter online and checking you get the same answers. (100 degrees C = 212 degrees F, 32 degrees F = 0 degrees C) */
allow the user to enter many temperatures. For example the input could be:
c 67.3
F 200
C 56.6
f 19.44
Do these exercise using While loops
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
