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

Describe what the following program does, and explain role of each line of code:

ID: 3659132 • Letter: D

Question

Describe what the following program does, and explain role of each line of code: #include #include #include using namespace std; const int NCOL = 7; const int NROW = 10; const int MAX_POWER = 99999; int main() { double min_power=MAX_POWER, power_out[NROW][NCOL]; unsigned int row, col; ifstream power; power.open("power1.dat"); for (row=0; row> power_out[row][col]; if (power_out[row][col] < min_power) min_power = power_out[row][col]; } cout << "Minimum power output was: " << min_power << endl; for (row=0; row<< "Week " << row << ", day " << col << " was a minimum power out day." << endl; return 0; }

Explanation / Answer

If the incoming variable being read into the array is less than the value of the minimum power usage variable, then the minimum power usage variable is set to that new value, and will hold the lowest power usage value at the end of the loo