Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to make a problem that will give an out put like this? That temperature is below absolute zero, and therefore is invalid. You need

How to make a problem that will give an out put like this?

"That temperature is below absolute zero, and therefore is invalid.

You need to enter a temperature that is greater than or equal to absolute zero.

Please enter a temperature:

11.0

Please enter your temperature scale:

Please enter Fahrenheit, Celsius, Kelvin, Rankine, Delisle, Newton, Roaumur, or Romer

pj

Please enter Fahrenheit, Celsius, Kelvin, Rankine, Delisle, Newton, Roaumur, or Romer

Fahrenheit

Please enter your target temperature scale:

Please enter Fahrenheit, Celsius, Kelvin, Rankine, Delisle, Newton, Roaumur, or Romer

ggg

Please enter Fahrenheit, Celsius, Kelvin, Rankine, Delisle, Newton, Roaumur, or Romer

Celsius

You entered 11.0 degrees Fahrenheit, which is equal to -11.67 degrees Celsius.

Would you like to enter another temperature?

Please enter Yes or No.

ccc

Please enter Yes or No.

Yes

Please enter a temperature:

33.0

Please enter your temperature scale:

Please enter Fahrenheit, Celsius, Kelvin, Rankine, Delisle, Newton, Roaumur, or Romer

Celsius

Please enter your target temperature scale:

Please enter Fahrenheit, Celsius, Kelvin, Rankine, Delisle, Newton, Roaumur, or Romer

Fahrenheit

You entered 12.0 degrees Celsius, which is equal to 53.6 degrees Fahrenheit.

Would you like to enter another temperature?

Please enter Yes or No.

No

Good-Bye!!

I know how to do a temperature conversion but i don't know how to make it keep repeat the question if the user enter error input or allow the user to keep enter as long as they want.

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

What are the various stages of a criminal trial? Describe each one.

Answered: 1 week ago