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, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
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, 18.07.2019 03:20
Questions on the website: 13722360