(1) Generate a power plant output (random numbers between 500and 1000 ) in megaw
ID: 3617838 • Letter: #
Question
(1) Generate a power plant output (random numbers between 500and 1000 ) in megawatts over a period of 10 weeks. Each row of datacontains 7 floating-point numbers that represent 1 week's data. Usesymbolic constants NROWS and NCOLS to represent the number of rowsand columns in the 2-D array. Apply srand() in the program.
(2) Compute and print the average power output over this 10-weekperiod. Print the number of days with greater-than-average poweroutput.Also print the day of the week and the number of the week onwhich the output is greater-than-average.
(3) Print the day of the week and the number of the week onwhich the minimum and maximum power output occurred.If there areseveral days with the minimum and maximum power output, print theinformation for each of these days.
(4) Record all output in a datafile, power1.dat .