
Patrick B. answered 05/17/21
Math and computer tutor/teacher
void printRowSums(const int values[][NUM_COLS], int numRows) {
//Do not modify anything on or above the line below this
//YOUR_CODE_BELOW
long rowTotal=0;
int i,j;
for (i=0; i<numRows; i++)
{
rowTotal = 0;
for (j=0; j<NUM_COLS; j++)
{
rowTotal += values[i][j];
}
cout << "row # " << (i+1) << " has total : " << rowTotal << endl;
}
//YOUR_CODE_ABOVE
//Do not modify anything on or below the line above this
}