Question: Matlab Write a script that will prompt the user for a temperature in degrees Celsius in the range from - 1 0 0 0 C

Matlab Write a script that will prompt the user for a temperature in degrees Celsius in the range from -1000C to
1000C, and then an F for Fahrenheit or K for Kelvin. The script will print the corresponding
temperature in the scale specified by the user. If the user enters a temperature value in degrees Celsius that
is outside the above range, an error message will be displayed and the script will keep prompting the user
to enter a new value until a valid value is entered. For example, the output might look like this: (red
numbers or character indicate values or character entered by the user).
Enter a temperature in degrees C: 1300
Error, temperature in degrees C must be between -1000 and 1000!
Enter a temperature in degrees C: 30.2
Do you want K or F? F
The temperature in degrees F is: 86.4
The format of the output should be exactly as specified above. The conversions are:
32
5
9
F C
K C 273.15

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!