Hide Transcribed Text Write  c++ a program that will accept a Celsius value between -40 degrees and 100 degrees. The number entered may contain decimal digits. Make these high and low values named constants. Also, make all temperatures floating point numbers and with two decimal digits when displayed. Using a while loop, allow the user to enter the value and if not in range continue to prompt the user for a valid value. Next prompt the user for the number of temperatures to be displayed. In a while loop repeat the following steps: 1. Calculate the Fahrenheit equivalent temperature and Kelvin equivalent temperature. The formulas are: Fahrenheit=9/5×Centigrade +32 Kelvin=Centigrade +273.15

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Hide Transcribed Text

Write  c++ a program that will accept a Celsius value between -40 degrees and 100 degrees. The number entered may contain decimal digits. Make these high and low values named constants. Also, make all temperatures floating point numbers and with two decimal digits when displayed.
Using a while loop, allow the user to enter the value and if not in range continue to prompt the user for a valid value.
Next prompt the user for the number of temperatures to be displayed.
In a while loop repeat the following steps:
1. Calculate the Fahrenheit equivalent temperature and Kelvin equivalent temperature.
The formulas are:
Fahrenheit=9/5×Centigrade +32
Kelvin=Centigrade +273.15 
Expert Solution
Step 1: Explaination of program

1) Below is C++ program that will accept a Celsius value between -40 degrees and 100 degrees, convert in Fahrenheit and Kelvin equivalent and display

  • This program will first prompt the user to enter a Celsius value within the specified range. If the entered value is not in the range, it will continue to prompt for a valid value.
  • Next, it will prompt the user for the number of temperatures to be displayed.
  • Then, in a while loop, it will calculate and display the Fahrenheit and Kelvin equivalents of the Celsius temperature for the specified number of times.

2) Save program in cpp file, build and run 

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education