97 of 100 menu

C++ Taskbook Level 10.7

Given two numbers, display the process of dividing these numbers in a column, as in school.

Given an arbitrary two-dimensional array:

{ {11, 12, 13, 14, 15}, {21, 22, 23, 24, 25}, {31, 32, 33, 34, 35}, {41, 42, 43, 44, 45}, {51, 52, 53, 54, 55}, }

Zero out the elements that are not on the diagonals:

{ {11, 0, 0, 0, 15}, { 0, 22, 0, 24, 0}, { 0, 0, 33, 0, 0}, { 0, 42, 0, 44, 0}, {51, 0, 0, 0, 55}, }

Given an arbitrary two-dimensional array:

{ {11, 12, 13, 14, 15}, {21, 22, 23, 24, 25}, {31, 32, 33, 34, 35}, {41, 42, 43, 44, 45}, {51, 52, 53, 54, 55}, }

Write code that will get an array of values ​​for a given column:

{ 13, 23, 33, 43, 54 }
enru