Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a complete program that opens a file for input and a file for output, read

ID: 3619843 • Letter: W

Question

Write a complete program that opens a file for input and a file for output, reads temperature data from the
input file and saves some statistics in the output file. The input file will look like this:
7
70.0 69.0 69.0 68.0 67.0 67.5 67.3 68.0 69.2 72.1 74.3 78.3 79.0 80.2 80.5 80.2 79.3 78.3 74.0 73.2 73.0 72.1 71.0 71.0
72.4 69.4 69.4 68.4 67.4 67.2 67.7 68.4 69.2 72.1 74.7 78.7 79.4 82.2 82.2 82.2 79.4 78.7 74.4 77.2 77.4 72.1 73.4 73.4
70.0 69.0 69.0 68.0 67.0 67.2 67.7 68.0 69.2 73.1 74.7 78.7 79.0 80.2 80.2 80.2 79.0 78.7 74.0 76.2 76.0 73.1 71.0 70.0
71.1 69.1 69.1 69.1 67.1 67.2 67.7 69.1 69.2 73.1 74.7 78.7 79.1 83.2 83.2 83.2 79.1 78.7 74.1 77.2 77.1 73.1 72.1 72.1
70.6 69.6 69.6 68.6 65.6 65.2 65.0 68.6 69.2 72.1 74.0 78.0 79.6 79.2 79.2 79.2 79.6 78.0 74.6 78.2 78.6 72.1 71.6 70.6
70.3 68.3 68.3 68.3 67.3 67.5 67.7 68.3 68.5 73.1 74.7 77.7 79.3 85.5 85.5 85.5 79.3 77.7 74.3 77.5 77.3 73.1 72.3 70.3
69.4 70.4 70.4 68.4 67.4 67.2 67.7 68.4 70.2 72.1 74.7 78.7 79.4 80.2 80.2 80.2 79.4 78.7 74.4 77.2 77.4 72.1 71.4
What you see is an integer at the beginning that represents how many rows will follow (7 rows for 7 days
of temperature data). Then each of the 7 rows has exactly 24 doubles.
The input file represents temperature readings over a 24 hour period for seven days (your program
should work for input files with more or fewer days; perhaps the input files has 2 days of data, or 600
days of data; there will always be 24 doubles for each day, however). Your program should read this file
and, for each day, find the average temperature, the high temperature, and the low temperature. This
information, for each day, should be saved in the output file

Explanation / Answer


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote