Question: C++ Q6: Code, compile and upload the following program. Name it Q6.cpp Multi-Dimensional Array a) Create a 8 by 5 integer array (use global const
Q6: Code, compile and upload the following program. Name it Q6.cpp Multi-Dimensional Array a) Create a 8 by 5 integer array (use global const int values for the dimensions). Populate it with b) c) random numbers between O and 99 inclusive The first five rows should contain on only odd numbers. Print the array by rows as shown. Print the array by columns as shown. Hint: you may want to create functions for printRows and printCols ly even numbers and the second 5 rows should contain d) Output Example Row 0: 68, 92, 22, 36, 92, Row 1: 80, 66, 94, 8, 68, Row 2: 92, 18, 6, 92, 62, Row 3: 56, 52, 52, 28, 98, Row 4: 93, 47, 59, 13, 19, Row 5: 37, 21, 95, 43, 39, Row 6: 35, 81, 53, 89, 59, Row 7: 33, 25, 39, 27, 83, Column 0: 68, 80, 92, 56, 93, 37, 35, 33, Column 1: 92, 66, 18, 52, 47, 21, 81, 25, Column 2: 22, 94, 6, 52, 59, 95, 53, 39, Column 3: 36, 8, 92, 28, 13, 43, 89, 27, Column 4: 92, 68, 62, 98, 19, 39, 59, 83
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
