Question
Write a C++ program that calculates the weekly average temperature for your area. Please create a column of 7 day names + 7 daily average
Write a C++ program that calculates the weekly average temperature for your area. Please create a column of 7 day names + 7 daily average temperatures (in F or C degrees), ending with the number -999. Then, create a C++ program that accepts the input, and calculates the weekly average of the 7 (or any number of) daily temperatures.
Use the While statement to input the row of temperatures and store the sum of those temperatures. Then, calculate and display the average of those temperatures.
The requested screen displayand a sample run of datamight be as follows (user input in bold):
Weekly Average Temperature Calculator -------------------------------------------------- Please enter a column of 7 day names & daily average temperatures, ending with the number -999: Mon 57 Tues 63 Wed 60 Thurs 65 Fri 62 Sat 55 Sun 57 -999
Based on these values, the weekly average temperature is: 59.9
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started