Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin Newton Your program should take...

60.1K

Verified Solution

Question

Programming

Temperature Converter

Create a temperature conversion program that will convert thefollowing to Fahrenheit:

Celsius
Kelvin
Newton
Your program should take a character which represents thetemperature to convert from and a value to be converted to usingthe following specification:

C - Celsius
K - Kelvin
N - Newton
In addition your program should take in the followingcharacter 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 untilthe '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 andshould output a value of 140

The following equations can be used to convert the differenttemperature 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 thisprogram.

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 beforethe while loop starts.

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

C++

Answer & Explanation Solved by verified expert
4.1 Ratings (511 Votes)
C Codeinclude includeusing namespace    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students