subject

Write a program that allows a user to input numbers (integers) into a two-dimensional array. Include the following:-Declare a 2-dimensional array named: numArray. o The array should be 3 rows x 4 columns - (although you can try different sizes).-Pass the array to a function named: getDatao The function should prompt the user to enter values (see output).o Use nested for loops to read in the data.-Once the data has been entered, pass the array to a function named: displayArrayo Clear the screen before displaying the data. o Use nested for loops to output the data. o Format the numbers so that they are aligned to the right in each column. o Space the columns evenly (see output). /* OUTPUT: Enter integers into the 2-Dimensional array: erver Explorer Toolbox Source. cpp" Project40 #include #include #include using namespace std; int const ROWS = 3; int const COLS = 4; void getData(int numArray[ROWS][COLS]); void displayArray(int numArray[ROWS] [COLS]); Fint main() int nunArray[ROWS] [COLS]; getData(numArray); display Array(numArray); system("pause"); return; void getData(int numArray[ROWS][COLS]) for(int i = 0; i < ROWS; i++) for (int j = 0; j < COLS; j++) cout << "Enter a number: \n"; cin >> nunArray[i][j]; Evoid displayArray(int numArray[ROWS][COLS]) for (int i = 0; i < ROWS; i++) for (int j = 0; j < COLS; j++) cout << numArray[i][s] << setprecision (2); I 60 % - O Ready 6 Enter a number: 1 Enter a number: 45 Enter a number: 765 Enter a number: Enter a number: 32 Enter a number: 45 Enter a number: 789 Enter a number: 343 Enter a number: 22 Enter a number: 64 Enter a number: 12 Enter a number: 555 Here is the data in the 2-Dimensional array: 1 45 765 6 32 45 789 343 22 64 12 555 Press any key to continue */

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 21:30
Suppose a router has built up the routing table shown in the table. subnet number 128.96.39.00 28.96.39.128 128.96.40.00 192.4.153.0 default) subnet mask 255.255.255.128 255.255.255.128 255.255.255.128 255.255.255.192 nexthop interface 0 interface 1 r2 r3 r4. the router can deliver packets directly over interfaces 0 and 1, or it can forward packets to routers r2, r3, or r4. describe what the router does with a packet addressed to each of the following destinations: (a) 128.96.39.10 (b) 128.96.40.12 (c) 128.96.40.151 (d) 192.4.153.17 (e) 192.4.153.90
Answers: 3
question
Computers and Technology, 24.06.2019 23:30
What is the opening page of a website called? a. web page b. landing page c. homepage d. opening page
Answers: 1
question
Computers and Technology, 24.06.2019 23:30
Game design colleges anyone know the requirements? ?
Answers: 1
question
Computers and Technology, 25.06.2019 02:30
What does a trademark indicate about a product? a trademark is a sign, symbol, or short phrase that indicates the of a product or service. type the correct answer in the box
Answers: 1
You know the right answer?
Write a program that allows a user to input numbers (integers) into a two-dimensional array. Include...
Questions
question
Mathematics, 03.06.2021 16:40
question
Spanish, 03.06.2021 16:40
question
Mathematics, 03.06.2021 16:40
question
Mathematics, 03.06.2021 16:40
question
Mathematics, 03.06.2021 16:40
question
Mathematics, 03.06.2021 16:40