Write a program that creates three tables of temperatures in Celsius, Fahrenheit and Kelvin. The program will prompt the user to enter the starting temperature, the ending temperature and the increment between values all in Celsius for each test case. The program will then convert Celsius to Fahrenheit AND Kelvin creating a table of temperatures. Your program will generate three tables - one for each type of loop. TEST CASE LOOP TYPE START TEMP (C) END TEMP (C) INCREMENT (C) ONE While Loop 10 50 5 TWO Do While Loop 25 250 25 THREE For Loop 0 100 10   Fahrenheit = 9.0/5.0 * Celsius + 32.0 Kelvin = Celsius + 273.15 Here is an example of the dialog between the program and user: Prompt:     Enter a starting temperature in degrees Celsius. User enters:     10 Prompt:     Enter an ending temperature in degrees Celsius. User enters:    50 Prompt:     Enter the increment between temperatures in degrees Celsius. User enters:    5 Example output from the third test case. FOR  LOOP  Celsius Fahrenheit    Kelvin   0.00        32.00       273.15 10.00        50.00       283.15 20.00        68.00       293.15 30.00        86.00       303.15 40.00      104.00       313.15 50.00      122.00       323.15 60.00      140.00       333.15 70.00      158.00       343.15 80.00      176.00       353.15 90.00      194.00       363.15 100.00     212.00      373.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

This program is intended to give you practice with the three loop structures in C++. You should already know how these loops are structured and how they work. If you need to review the textbook sections are given below.

  • While Loop            (See chapter 6 section 3)
  • Do - While Loop (See chapter 7 section 2)
  • For Loop  (See chapter 7 section 3)

Write a program that creates three tables of temperatures in Celsius, Fahrenheit and Kelvin. The program will prompt the user to enter the starting temperature, the ending temperature and the increment between values all in Celsius for each test case. The program will then convert Celsius to Fahrenheit AND Kelvin creating a table of temperatures. Your program will generate three tables - one for each type of loop.

TEST CASE LOOP TYPE START TEMP (C) END TEMP (C) INCREMENT (C)
ONE While Loop 10 50 5
TWO Do While Loop 25 250 25
THREE For Loop 0 100 10

 

Fahrenheit = 9.0/5.0 * Celsius + 32.0
Kelvin = Celsius + 273.15

Here is an example of the dialog between the program and user:

Prompt:     Enter a starting temperature in degrees Celsius.
User enters:     10

Prompt:     Enter an ending temperature in degrees Celsius.
User enters:    50

Prompt:     Enter the increment between temperatures in degrees Celsius.
User enters:    5

Example output from the third test case.

FOR  LOOP

 Celsius Fahrenheit    Kelvin

  0.00        32.00       273.15
10.00        50.00       283.15
20.00        68.00       293.15
30.00        86.00       303.15
40.00      104.00       313.15
50.00      122.00       323.15
60.00      140.00       333.15
70.00      158.00       343.15
80.00      176.00       353.15
90.00      194.00       363.15
100.00     212.00      373.15

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 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