Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Temperature Converter In C++, Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin Newton Your program should take a character

Temperature Converter

In C++, Create a temperature conversion program that will convert the following to Fahrenheit:

Celsius

Kelvin

Newton

Your program should take a character which represents the temperature to convert from and a value to be converted to using the following specification:

C - Celsius

K - Kelvin

N - Newton

In addition your program should take in the following character to exit the program:

X - eXit the program

The numeric input for your program should be of type double. The program will continue to input and convert temperatures until the 'X' character is input for the conversion type.

Your input should be in the following form:

60 C

This would convert the 60 degrees Celsius to Fahrenheit and should output a value of 140

The following equations can be used to convert the different temperature types to Fahrenheit:

Kelvin - F = (K - 273.15) * 1.8000 + 32

Celsius - F = C * 9/5 + 32

Newton - F = N * 60 / 11 + 32

Required:

You are not allowed to use a do-while loop for this program.

Use a while loop in conjunction with a switch statement. Please review the information on primed loops.

You must prime your loop with input from the keyboard before the while loop starts.

The program should continue converting temperatures until X is entered as a conversion type.

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

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

=+3. How appropriate would it be to conduct additional research?

Answered: 1 week ago