Question
Problem 3 (10 points) The formula to convert from degrees Fahrenheit to degrees Celsius is given as TC=59(TF32) (3) where TC is the temperature expressed
Problem 3 (10 points)
The formula to convert from degrees Fahrenheit to degrees Celsius is given as
TC=59(TF32) | (3) |
where TC is the temperature expressed in degrees Celsius and TF is the temperature expressed in degrees Fahrenheit. The formula to convert from degrees Celsius to Kelvin is given as
TK=TC+273.15 | (4) |
where TK is the temperature in Kelvin.
Implement a while loop that will keep running until a Boolean loop control variable is set to false; simulate the behavior of a do while loop by pre-initializing the variable to true before you enter the loop. On each pass of the loop, prompt the user to enter a temperature in Fahrenheit and calculate the equivalent temperatures in both Celsius and Kelvin; store the calculated results in arrays, one for the Celsius calculations and another one for the Kelvin calculations. At the end of the iteration, prompt the user to see if the user wants the program to run again. If the user enters the number one (1), the user wants the program to run again; if the user enters any other number, the user wants the program to terminate. Use this test to determine if the value of the Boolean loop control variable should change.
Once you have terminated the while loop, perform these calculations:
If there are less than four (4) temperatures entered, calculate the median of all of the Celsius temperatures; otherwise, if there are four (4) or more temperatures entered, calculate the median of only the first four (4) Celsius temperatures.
Programmatically determine the minimum Kelvin temperature in your data set.
Using disp statements, print the results from the above bullet points to the Command Window with appropriate labels and units.
n-Q (Tr-32) 5-9Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started