Question: Temperature Conversion Time left 2 : 4 5 : 3 5 Hide Create a C + + program that converts temperatures between Celsius and Fahrenheit
Temperature Conversion
Time left ::
Hide
Create a program that converts temperatures between Celsius and Fahrenheit using a menu. The program should follow these steps:
Display a menu with options for converting from Celsius to Fahrenheit, Fahrenheit to Celsius, and quitting the program.
Implement functions for each conversion that take a temperature as a parameter and retum the converted value: double celsiusToFahrenheitdouble celsius
double fahrenheitToCelsiusdouble fahrenheit
Include a function to display the menu:
void showMenu
Use a loop to continuously display the menu and prompt the user for their choice.
Use a switch statement to call the appropriate function based on the user's choice.
If the user selects a conversion option, prompt for the temperature, call the corresponding function, and display the result:
Exit the program when the user chooses to quit display an appropriate message
Formula
Celsius to Fahrenheit:
Fahrenheit to Celsius:
Sample Outputs
Temperature Conversion Menu:
Celsius to Fahrenheit
Fahrenheit to Celsius
Sample Outputs
Temperature Conversion Menu:
Celsius to Fahrenheit
Fahrenheit to Celsius
Quit
Enter your choice:
Enter temperature:
Temperature in Fahrenheit:
Temperature Conversion Menu:
Celsius to Fahrenheit
Fahrenheit to Celsius
Quit
Enter your choice:
Enter temperature:
Temperature in Celsius:
Temperature Conversion Menu:
Celsius to Fahrenheit
Fahrenheit to Celsius
Quit
Enter your choice:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
