Question
Write a program to calculate a temperature provided by the user into a different unit system. The program should ask the user to enter a
Write a program to calculate a temperature provided by the user into a different unit system. The program should ask the user to enter a temperature unit of degrees Fahrenheit. The program should then ask the user to choose a unit system they would like to have the value converted into, using a menu. The menu should display the choices " deg, C, k and deg R, which should be a stored in cell array. The program should display the output in a sentence formatted as shown below. The actual values in the sentence should change appropriately as the user input and menu selection changes.
Enter the temperature (Deg F) : -128 Menu Chose : k
The Equivalent temperature to -129 Deg F is 184 K.
You are to write this program twice, using two different method as indicated below. Note that in neither case may you use conditional statement, even it you know ho to do so.
a. The program should first convert the temperature in degrees Fahrenheit to all three other unit systems ( degrees Celsius, kelvin, degrees Rankine) and store the result in a vector. it should then generate the report.
b. The program should perform ONLY the specified calculation, not all three, then generate the report. Hint: Store the necessary conversion factors in matrix.
M Choose a final unit deg C K deg R X
Step by Step Solution
3.42 Rating (146 Votes )
There are 3 Steps involved in it
Step: 1
Program a mdeg C Kdeg R tinputEnter the temperature deg F choicemenuChoose a f...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
Document Format ( 2 attachments)
60961da9089d9_26620.pdf
180 KBs PDF File
60961da9089d9_26620.docx
120 KBs Word File
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started