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

Problem: For this lab you should declarea 2-D array that will contain up to 20 r

ID: 3614916 • Letter: P

Question

Problem: For this lab you should declarea 2-D array that will contain up to 20 rows and 15 columns. The template for this lab that has been posted on ANGEL containscode to prompt the user to enter the number of rows and columnshe/she would like to use, confirms the user’s entry is valid,and contains a function to print the array. You are to add afunction that will accept the 2D array and the rows and columnsspecified by the user then fill the array so that each number inthe array is (2 * the row index) plus (3 * the column index). For example a 3 by 4 matrix would look like

0   3    6    9

2   5    8   11

4    7  10   13

Before you try to write any code, clearly define the purpose ofyour function, the necessary input for your function and theprocessing that your function will employ as comments before yourfunction. (Do NOT ask for help with code unless thesecomments are written, you may ask for help in answering thequestions.)

Once your function has been written add the function callsand function prototypes for your function and for the function toprint the array.

Try the code with a 3 by 4 array and with other arrays toconfirm it works correctly. Fix any errors.

Here is the template:


Explanation / Answer

please rate - thanks #include #include using namespace std; void fill(int[][15],int,int);    void Print2DArray(int[][15],int,int); int main() { //declare an array for whole numbers that may contain 20 rows and15 columns int rows, cols,a[20][15]; //getting number rows and columns from user cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote