The data must be stored in an array compute the statistics


Problem: A local amateur meteorologist has been recording daily high temperatures throughout a typical summer month.

He would like you to write a program to compute some statistics based on the data he has collected. He has placed the name of the month and each daily high temperature on a separate line in a file named "summer_temps.txt".

The high temperatures are in order so that the first one is for the first of the month, the second is for the second day, and so on. The statistics that the meteorologist would like for you to compute in your program are:

The average daily high temperature for the entire month.

The number of days over 100 for the month.

The maximum temperature for the month and on what day it occurred.

Input: All of the input will come from a file named "summer_temps.txt". The temperatures may have fractional parts, like 99.87. Your program should also test for file open errors.

Processing: The data must be stored in an array. Compute the statistics requested above. Use a function for each task as well as a function to read in the data (we will write that in class).

Output: Display the statistics to the screen, labelled, and with the temperatures formatted to 1 decimal place.

summer_temps.txt input values

June 88.9 90.6 94.3 77.7 80.5 88.9 90.2 92.3 94.5 96.7 99.8 100.3 101.7 88.9 92.7 94.6 99.8 98.3 101.3 102.2 94.3 77.7 80.5 88.9 90.2 92.3 94.5 96.7 99.8 89.7
Please show me the code and add note as you solving this program. also include input value.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: The data must be stored in an array compute the statistics
Reference No:- TGS02898483

Expected delivery within 24 Hours