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
What type of file does a cookie place on web site visitors' computers so that web site managers can customize their sites to their visitors' preferences?
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Report all segments of identity by descent longer than 20 polymorphisms between pairs of individuals in the following cohort of 15 individuals across 49 polymorphisms: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 numeric input 2 points possible (graded) you have 2 attempts to complete the assignment below. for example if the sequence is "bcd", which occurs in "abcdef" , the starting point would be 2 (b), and the finishing point would be 4(d). individuals 7,10 between positions
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
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, 15.01.2021 18:20
question
History, 15.01.2021 18:20
question
Mathematics, 15.01.2021 18:20
question
Mathematics, 15.01.2021 18:20
question
Mathematics, 15.01.2021 18:20
question
Mathematics, 15.01.2021 18:20
Questions on the website: 13722361