You are to write programming logic to convert temperature from Celsius to Fahrenheit for some specific values of temperatures. In performing the conversion for these values, you are to use a loop. Within the loop you will covert the specific values from Celsius to Fahrenheit. The loop may be either a while loop or a for loop. Write a program called temperatureLoop Convert.cpp to convert 3 temperature values from Celsius to Fahrenheit. Requirements. 1. Use these 3 Celsius temperature values: -40° C,0° C, 100° C in a loop. Each time the loop is performed (that is, each time the loop iterates) one of the Celsius temperature values is converted to Fahrenheit. That is: 1st time loop is performed/iterates: -40° C is converted to Fahrenheit. 2nd time loop is performed/iterates: 0° C is converted to Fahrenheit. 3rd time loop is performed/iterates: 100° C is converted to Fahrenheit. 2. From Programming Exercise 5.4: The loop must use this formula inside it. Each time the loop is performed (that is, each time the loop iterates) one of the Celsius temperature values is converted to Fahrenheit. That is: 1st time loop is performed/iterates the formula is used to convert -40° C to Fahrenheit. 2nd time loop is performed/iterates the formula is used to convert 0° C to Fahrenheit. 3rd time loop is performed/iterates the formula is used to convert 100° C to Fahrenheit. Note -40° C is -40° F, 0° C is 32° F, 100° C is 212° F. Feel free to use these values to make sure your program is displaying the correct Fahrenheit values Program I/O. Input: None. Output should be in a table like format that looks similar to this: Temperatures From Celsius To Fahrenheit -40 C 0 C 100 C F = (9/5) C + 32 -40 F 32 F 212 F ======

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
**Title: Temperature Conversion Program in C++**

**Objective:**
Develop a C++ program to convert temperatures from Celsius to Fahrenheit using a loop structure.

**Program Overview:**

You are tasked with writing a program called `temperatureLoopConvert.cpp` to convert three specific temperature values from Celsius to Fahrenheit. The loop, which can either be a `while` or `for` loop, will iterate through the given temperatures and convert each value using a specified formula.

**Requirements:**
1. **Temperature Values:** 
   - Use these three Celsius values: -40°C, 0°C, 100°C.
   - In each loop iteration, one Celsius temperature will be converted to Fahrenheit.

2. **Conversion Formula:**
   - Use the formula \( F = \frac{9}{5} C + 32 \).
   - Loop through each temperature:
     - 1st iteration: Convert -40°C to Fahrenheit.
     - 2nd iteration: Convert 0°C to Fahrenheit.
     - 3rd iteration: Convert 100°C to Fahrenheit.

**Conversion Details:**
- Temperature conversions:
  - -40°C is equivalent to -40°F.
  - 0°C is equivalent to 32°F.
  - 100°C is equivalent to 212°F.
 
You can use these conversions to validate the output of your program.

**Program Input/Output:**
- **Input:** None required.
- **Output:** Display results in a tabular format:
  ```
  Temperatures From Celsius To Fahrenheit
  ========================================
  -40 C          -40 F
   0 C           32 F
  100 C         212 F
  ```

Follow these instructions to ensure your program successfully converts and displays the temperatures accurately.
Transcribed Image Text:**Title: Temperature Conversion Program in C++** **Objective:** Develop a C++ program to convert temperatures from Celsius to Fahrenheit using a loop structure. **Program Overview:** You are tasked with writing a program called `temperatureLoopConvert.cpp` to convert three specific temperature values from Celsius to Fahrenheit. The loop, which can either be a `while` or `for` loop, will iterate through the given temperatures and convert each value using a specified formula. **Requirements:** 1. **Temperature Values:** - Use these three Celsius values: -40°C, 0°C, 100°C. - In each loop iteration, one Celsius temperature will be converted to Fahrenheit. 2. **Conversion Formula:** - Use the formula \( F = \frac{9}{5} C + 32 \). - Loop through each temperature: - 1st iteration: Convert -40°C to Fahrenheit. - 2nd iteration: Convert 0°C to Fahrenheit. - 3rd iteration: Convert 100°C to Fahrenheit. **Conversion Details:** - Temperature conversions: - -40°C is equivalent to -40°F. - 0°C is equivalent to 32°F. - 100°C is equivalent to 212°F. You can use these conversions to validate the output of your program. **Program Input/Output:** - **Input:** None required. - **Output:** Display results in a tabular format: ``` Temperatures From Celsius To Fahrenheit ======================================== -40 C -40 F 0 C 32 F 100 C 212 F ``` Follow these instructions to ensure your program successfully converts and displays the temperatures accurately.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 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