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.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 7PE
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning