Write C++ code that reads the weather temperature forecast for a week. Users are free to enter temperatures in either Fahrenheit or Celsius. The program will then calculate the average temperature for the entire week and display the results in both Fahrenheit and Celsius. Furthermore, the program will provide descriptive information about the forecast, indicating whether the average temperature is freezing, cold, cool, warm, hot, or boiling. Here are the specific program details: • The program should begin by prompting the user to select the temperature unit, either Fahrenheit or Celsius (use switch). • Subsequently, the program should request the user to input 7 temperature readings, which will be stored in an array. • The program's next step is to calculate the average temperature forecast. • The program will then display the calculated average temperature in both Fahrenheit and Celsius degrees to the user. • The average is then printed back to the user in both Fahrenheit and Celsius degrees. • Following that, the program will provide a description of the weekly weather based on the following criteria: 0 °C or below Freezing Below 15 °C Cold Below 25 °C Cool Below 30 °C Warm Below 40 °C Hot Below 100 °C Too hot to live in 100 °C or above Boiling • To enhance user engagement, conclude with an interesting message of your choice that describes the temperature forecast. You are required to make your code readable and self-documented;  • Multiple-line comments that: o Identify the owners (who wrote it) and their IDs. o Explain the purpose of the program and the input and output of the code. • Single-line comments that explain complicated or confusing statements and justify your reasoning. (at least 3) • White spaces such as indentation, spaces, and blanks. • Self-documenting variable names. Evaluation (10%): • Test your program with the sample data in the below screenshots (just for you to make sure you get correct results) • Take screenshots of 2 other sample runs that provide different outputs every time. Please pick the temperature unit, type 'c' for Celsius or 'f' for Fahrenheit: c Enter the 7 temperature readings: Day 1: 4 Day 2: 5 Day 3: 2 Day 4: 9 Day 5: 10 Day 6: 9 Day 7: 7 The temperature in Celsius is 6.57143 The temperature in Fahrenheit is 43.8286 The weather is cold, a coat will be enough. Please pick the temperature unit, type 'c' for Celsius or 'f' for Fahrenheit: f Enter the 7 temperature readings: Day 1: 32 Day 2: 56 Day 3: 70 Day 4: 67 Day 5: 75 Day 6: 45 Day 7: 34 The temperature in Celsius is 12.3016 The temperature in Fahrenheit is 54.1429 The weather is cold, a coat will be enough!

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

Write C++ code that reads the weather temperature forecast for a week. Users are free to enter temperatures in either Fahrenheit or Celsius. The program will then calculate the average temperature for the entire week and display the results in both Fahrenheit and Celsius. Furthermore, the program will provide descriptive information about the forecast, indicating whether the average temperature is freezing, cold, cool, warm, hot, or boiling. Here are the specific program details:

• The program should begin by prompting the user to select the temperature unit, either Fahrenheit or Celsius (use switch).
• Subsequently, the program should request the user to input 7 temperature readings, which will be stored in an array.
• The program's next step is to calculate the average temperature forecast.
• The program will then display the calculated average temperature in both Fahrenheit and Celsius degrees to the user.
• The average is then printed back to the user in both Fahrenheit and Celsius degrees.
• Following that, the program will provide a description of the weekly weather based on the following criteria:
0 °C or below Freezing
Below 15 °C Cold
Below 25 °C Cool
Below 30 °C Warm
Below 40 °C Hot
Below 100 °C Too hot to live in
100 °C or above Boiling
• To enhance user engagement, conclude with an interesting message of your choice that describes the temperature forecast.
You are required to make your code readable and self-documented; 
• Multiple-line comments that:
o Identify the owners (who wrote it) and their IDs.
o Explain the purpose of the program and the input and output of the code.
• Single-line comments that explain complicated or confusing statements and justify your reasoning. (at least 3)
• White spaces such as indentation, spaces, and blanks.
• Self-documenting variable names. Evaluation (10%):
• Test your program with the sample data in the below screenshots (just for you to make sure you get correct results)
• Take screenshots of 2 other sample runs that provide different outputs every time.
Please pick the temperature unit, type 'c' for Celsius or
'f' for Fahrenheit: c
Enter the 7 temperature readings:
Day 1: 4
Day 2: 5
Day 3: 2
Day 4: 9
Day 5: 10
Day 6: 9
Day 7: 7
The temperature in Celsius is 6.57143
The temperature in Fahrenheit is 43.8286
The weather is cold, a coat will be enough.
Please pick the temperature unit, type 'c' for Celsius or
'f' for Fahrenheit: f
Enter the 7 temperature readings:
Day 1: 32
Day 2: 56
Day 3: 70
Day 4: 67
Day 5: 75
Day 6: 45
Day 7: 34
The temperature in Celsius is 12.3016
The temperature in Fahrenheit is 54.1429
The weather is cold, a coat will be enough!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Algebraic Expressions
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