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.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter5: Looping
Section: Chapter Questions
Problem 1GZ
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.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,