Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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.cpp

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

Discuss the techniques of sales forecasting.

Answered: 1 week ago

Question

Write short notes on Marketing mix.

Answered: 1 week ago