Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ In this program we will compute the conversions between Fahrenheit degrees and Celsius. The program will ask the user to: Enter a temperature value
C++
In this program we will compute the conversions between Fahrenheit degrees and Celsius. The program will ask the user to: "Enter a temperature value followed by F (for Fahrenheit) or C (for Celsius): "Store the number in a double object called deg and the units in a string object called units. Use if/else selection statement to compute, based on the units entered, the degrees in both Celsius and Fahrenheit. Use degF and degC for the respective temperature. The formulas for the conversion are: degC = (degF-32.0)5.0/9.0 degF = 1.8degC+32.0 In case, the units are not recognized, display a message stating so. Use the following sample output below. Sample output 1: Enter a temperature value followed by F (for Fahrenheit) or c (for Celsius): 33 C 33 C = 91.4 F. Sample output 2: Enter a temperature value followed by F (for Fahrenheit) or C (for Celsius): 400 F 400 F = 204.444 C. Sample output 3: Enter a temperature value followed by F (for Fahrenheit) or c (for Celsius): 234 k The type of unit you entered 'k' is not recognized. Submit file name: temperature.cppStep 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