Question: Write a simple and very basic C + + program ( using Array ) that allows the user to input temperatures recorded over 7 days.

Write a simple and very basic C++ program (using Array )that allows the user to input temperatures recorded over 7 days.
The program should:
Calculate the average temperature.
Count how many days had temperatures above the average.
Count how many days had temperatures below the average.
Ex: If the input is:
Enter temperatures for 7 days:
Day 1: 22.6
Day 2: 24.7
Day 3: 23.4
Day 4: 27.6
Day 5: 25.3
Day 6: 22.4
Day 7: 24
The output is:
Average Temperature: 24.2857 degrees
Days above average: 3
Days below average: 4
Write a simple and very basic C + + program (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!