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

1) Genereate a power plant output (random number from 500 to 1000) in megawattso

ID: 3534647 • Letter: 1

Question

1) Genereate a power plant output (random number from 500 to 1000) in megawattsover a periods of 10 weeks. Each rows of the data contains 7 floating- point numbers that reperesents 1 week's data.Use symbolic constants NROWS and NCOLS to represents the number of rows and columns in the 2-D array. Apply srand() in the program.


2) Print power output in a 2-D format with headers(number of weeks and number of days).


3)Compute and print the average power output over this 10- week period. Print the number of days with greater- than- average power output. also print the day of the week and the number of the week on which the output is greater than average.


4)Print the day of the week and the number of the week on which the minimum and the maximum power occured. If there are several days for the minimum and the maximum power output , print the information for each of these day.


5) Record output to a datafile, powe1.dat


Explanation / Answer

please rate - thanks message me if any problems #include#include using namespace std;#define NROWS 10#define NCOLS 7int main(){double pp[NROWS][NCOLS],min,max,sum=0,average;int i,j;ofstream out;srand(time(0));out.open("power1.dat");for(i=0;i