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 T 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!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
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:
32
Day 1:
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!
Transcribed Image Text: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: 32 Day 1: 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
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY