Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago