C++ Program:
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <ctime>
using namespace std;
//Structure
struct Temperature
{
string day;
float ave;
};
//Function that returns average
float getAverage(unsigned short temps[15], int idx)
{
float sum = 0;
int i;
//Looping
for(i=idx; i<idx+3; i++)
{
sum = sum + temps[i];
}
return (sum/3.0);
}
//Main function
int main()
{
int i, j;
int max=120, min=32;
unsigned short temp[15];
srand(time(0));
//Creating array of structures
struct Temperature days[5];
cout << fixed << setprecision(1);
//Generating random values
for(i=0; i<15; i++)
{
temp[i] = rand()%(max-min + 1) + min;
}
//Filling structures
days[0].day = "Monday";
days[0].ave = getAverage(temp, 0);
//Filling structures
days[1].day = "Tuesday";
days[1].ave = getAverage(temp, 3);
//Filling structures
days[2].day = "Wednesday";
days[2].ave = getAverage(temp, 6);
//Filling structures
days[3].day = "Thursday";
days[3].ave = getAverage(temp, 9);
//Filling structures
days[4].day = "Friday";
days[4].ave = getAverage(temp, 12);
//Printing values
for(i=0; i<5; i++)
{
cout << endl << days[i].day << ", average temp
with " << days[i].ave;
}
cout << endl;
return 0;
}
_____________________________________________________________________________________________________
Sample Run:

need help Instructions Assume we collected weather temperature data from a city for 5 day, Mon...
Hi im having trouble with this homework question. Can someone
show me how to do this in C++ with all the steps?
Weather Analysis WeatherAnalyzer - New Day Data 2- Good Days 3- Summary 0- Exit Step 0: You can get the sample file from this link: Each row in the text file represent weather measurement of a day. For each day, the file contains the temperature (first column), humidity (second column) and the wind (third column) values emp 70...