Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve in c the base template is given 3.30 Lab: Temperature Converter with a Menu The goal of this lab is to create a

please solve in c
the base template is given image text in transcribed
image text in transcribed
image text in transcribed
3.30 Lab: Temperature Converter with a Menu The goal of this lab is to create a calculator to convert a temperature between different units. Print a menu of temperature units available as either an input or output to the calculator Ask the user for the units of the input temperature Use the unit_input variable to grab a character Ask the user for the desired units of the output temperature Use the unit_output variable to grab a character Ask the user for the input temperature (use prior unit_input character in the print statement) Create a switch/case statement that calculates the Kelvin equivalent of the input temperature o Use the Kelvin Variable to hold the result - Have a case for each input temperature (remember to use single quotes for characters) Create a switch/case statement that calculates the desired equivalent output temperature Convert from Kelvin to desired units Store the result in the output variable Have a case for each output temperature (remember to use 'single quotes for characters) -Display the result Some useful formulas: IKI = [C] + 273.15 [K]= 5/9*([F] +459.67) Iki= 5/9 *[R] An example of the program is displayed below: Ich 29 IK) = 5/9* [F] + 459.67) [K] =5/9* [R] . An example of the program is displayed below: **********TEMPERATURE CONVERSION CALCULATOR ***** ******* Temperature Units****** C) Celsius K) Kelvin F) Fahrenheit R) Rankine Input Temperature Unit (C, E, F, or R) >E Output Temperature Unit (C, K, F, or R)>C Enter Temperature (deg F)>70 RESULT: 70.00F is equal to 21.11C 297498 1584116 LAB ACTIVITY 3.30.1: Lab: Temperature Converter with a Menu main -chi O IT 3 ASUS VivoBook 1 #include 2 include 4 int main() SO Vare Variable 7 double input, output: //Input and output temperatures double Kelvin; W/Kelvin equivalent of Input 9 char enit input, unit_output; ie 11 12 yolsplay Menu of Options 13 14 15 16 User Shout 17 1/Query User for Input Top Units 18 19 20 //Query User for Output You Units/ 21 22 23 Query User for Input Tesp// 24 25 26 27 **Create a Switch statement to calculate the Kelvin Equivalent 28 temperature of the input temperature 29 You will need case for C, F, Rand K * 30 1 32 33 314 25 36 37 Create a witch start to calculate the output untuivalent temperature based on the previously calculated Kelvin temperature You will need case for and **/ 19 40 41 V**Print the Results I single platf statent. e to search A. I / Ranh

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions