C++ program that creates and initializes a two-dimensional array
$5-10 USD
Terminado
Publicado hace casi 12 años
$5-10 USD
Pagado a la entrega
Write a C++ program that creates and initializes a two-dimensional array with the following data:
int num [ 5 ] [ 4 ] = { { 7, 3, 2, 15 },
{ 23, 45, 6, 9 },
{ 30, 17, 29, 31 },
{ 13, 5, 88, 87 },
{ 25, 33, 37, 41 };
Using a nested for loop, traverse the array and print out each number except those evenly divisible by 5. You can use column/array or array/column order, so your output would be either
7 23 13 3 17 33 2 6 29 88 37 9 31 87 41
or
7 3 2 23 6 9 17 29 31 13 88 87 33 37 41