Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that allows a user to convert a temperature given in degrees from either Celsius to Fahrenheit or Fahrenheit to Celsius. Use the

Write a program that allows a user to convert a temperature given in degrees from either Celsius to Fahrenheit or Fahrenheit to Celsius. Use the following formulas:

DegreesC = 5(DegreesF 32)/9

DegreesF=(9(DegreesC)/5) + 32)

Prompt the user for a temperature and either a C or c for Celsius or an F or f for Fahrenheit. Convert the temperature to Fahrenheit if either C or c is entered (meaning the user gave you the temperature in Celsius), or to Celsius if either f or F is entered ( because the user gave you the temperature in Fahrenheit). Display the temperature with at most two places after the decimal point. (Convert whatever temperature the user gives you, even if it is a very high positive number or a very low negative one).

Test your output is correct by finding a temperature converter online and checking you get the same answers. (100 degrees C = 212 degrees F, 32 degrees F = 0 degrees C) */

allow the user to enter many temperatures. For example the input could be:

c 67.3

F 200

C 56.6

f 19.44

Do these exercise using While loops

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

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions

Question

What is the fundamental accounting model?

Answered: 1 week ago