The data file power1.dat contains a power plant output in megawattsover a period
ID: 3617186 • Letter: T
Question
The data file power1.dat contains a power plant output in megawattsover a period of 8 weeks. Each row of data contains 7 integers thatrepresent 1 week's data. In developing the following programs, usesymbolic constants NROWS and NCOLS to represent the number of rowsand the number of columns in the array used to store the data.power1.dat below
207 301 222 302 22 167 125367 60 120 111 301 499 434211 62 441 192 21 293 316401 340 161 297 441 117 206448 111 370 220 264 444 20721 313 204 22 446 401 337213 208 444 321 320 335 313162 137 265 44 370 315 322
Write a program to print the day of the week and the number of the week on which the minimum power output occurred. If there are several days with the minimum power output, print the information for each day.
power1.dat below
207 301 222 302 22 167 125367 60 120 111 301 499 434211 62 441 192 21 293 316401 340 161 297 441 117 206448 111 370 220 264 444 20721 313 204 22 446 401 337213 208 444 321 320 335 313162 137 265 44 370 315 322
Write a program to print the day of the week and the number of the week on which the minimum power output occurred. If there are several days with the minimum power output, print the information for each day.
207 301 222 302 22 167 125367 60 120 111 301 499 434211 62 441 192 21 293 316401 340 161 297 441 117 206448 111 370 220 264 444 20721 313 204 22 446 401 337213 208 444 321 320 335 313162 137 265 44 370 315 322
Write a program to print the day of the week and the number of the week on which the minimum power output occurred. If there are several days with the minimum power output, print the information for each day.
Explanation / Answer
please rate - thanks #include #include #define NROWS 8 #define NCOLS 7 int main() {int a[NROWS][NCOLS],i,j,sum=0,greater=0; double average; FILE *fp; if(!(fp=fopen("power1.dat","r"))) { printf(" Error opening%s ","power1.dat"); system("PAUSE"); return 1; } for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.