Question: Write a program that will accept a Celsius value between -40 degrees and 100 degrees. The number entered may contain decimal digits. Make these

Write a program that will accept a Celsius value between -40 degrees and 100 degrees. The number entered may

Write a program that will accept a Celsius value between -40 degrees and 100 degrees. The number entered may contain decimal digits. Make these high and low values named constants. Also, make all temperatures floating point numbers and with two decimal digits when displayed. Using a while loop, allow the user to enter the value and if not in range continue to prompt the user for a valid value. Next prompt the user for the number of temperatures to be displayed. In a while loop repeat the following steps: 1. Calculate the Fahrenheit equivalent temperature and Kelvin equivalent temperature. The formulas are: Fahrenheit = 9/5 x Centigrade + 32 Kelvin = Centigrade + 273.15 2. Now display the temperatures in a table format as shown below. The values must be displayed in fixed format with two decimal places. 3. For each iteration of the loop, provide for a temperature increment of 0.5, not just 1. 3. Continue steps 1 and two until the number of temperatures requested is met. 4. In this program you must use the increment operator at least once. The following is a sample run of the completed program. COSC 1550 - Program PGM-06-1 Temperature Conversion Enter the first Celsius temperature between -40 and 100: -200 That temperature not in the valid range, re - enter: 200 That temperature not in the valid range, re enter: 20 Enter the number of temperatures desired:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!