Question: Steps for For these two assignments ( Program 1 2 and Program 1 3 ) , you will use the same data file but your

Steps for
For these two assignments (Program 12 and Program 13), you will use the same data file but your programs will process the file in different ways.
Data file
The data file linked for the assignment is weatherdata.txt.
This file contains wind speed and temperature data for 30 days.
The first value on each line is the day - day 1, day 2, day 3, etc., up to day 30.
The second value on the line is the wind speed in knots -14 knots for day 1,12 knots for day 2, etc., up to 14 knots for day 30.
The third value on the line is the temperature in Celsius -25 c for day 1,31 c for day 2, etc., up to 22 c for day 30.
\table[[weatherdata.txt - Notepad],[1,14,,25,],[2,12,,31,],[3,5,,35,],[4,11,,33,],[5,8,,21,],[6,9,,35,],[7,12,,25,],[8,13,,34,],[9,8,,32,],[10,,13,28,],[11,6,6,32,],[12,,13,29,],[13,6,6,28,],[14,8,8,35,],[15,5,5,25,],[16,6,6,28,],[17,8,8,34,],[18,8,8,21,],[19,3,3,31,],[20,,15,22,],[21,5,5,35,],[22,6,6,33,],[23,,12,27,],[24,,15,27,],[25,,12,34,],[26,,14,23,],[27,,14,22,],[28,5,5,21,],[29,7,7,29,],[30,,14,22,]]
For Programs 12 and 13, you will read this data and process it to produce the average wind speed and the average temperature once without using arrays and once with using arrays.
In either case your output can be very simple:
C:\Users \ill\Desktop ??? Miami \Programming Languages ??C++dotsProgram 12For this program you will read the data in the file, using it to calculate and output the average wind speed and the average temperature.Do not store the data in arrays (or any other structure). You should have not more than one days worth of data stored at any one time. Calculate your sum as you go.Do not program this with a hard coded value of 30 used as the divisor to produce your averages. Maintain a count as you go.
Program 13
For this program you will read the data in the file into arrays for the wind speed and for the temperature, then use the stored data to calculate and output the average wind speed and the average temperature.
Steps for For these two assignments ( Program 1 2

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!