Question: create a debug this program in Visual C++, and upload for grading. Declare a 2D array, 4 rows by 3 columns, initialized to all zeros.

create a debug this program in Visual C++, and upload for grading.

Declare a 2D array, 4 rows by 3 columns, initialized to all zeros.

The program should prompt for and read a list of integers into the 2-dimensional array

It should stop reading in new values when the user types a non-numeric or at 12 numbers, whichever comes first.

Then the program should print out:

  • the average of the values entered.
  • the maximum value entered
  • the array as a 4x3 matrix, with spacing of 3 spaces per column (Hint:setw(3))
  • the array transposed, as a 3x4 matrix (just print it in transposed order, do not create an actual 3x4 array. To print it transposed, just copy the nested loop that printed it as 4x3, and make the outer loop the columns and inner loop the rows)

Example program run (the program prints everything below except the user input, whch is:1 2 3 4 5 6 7 q

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!