Write a function in C++ which accepts a 2D array of integers and its size as
arguments and displays the elements which lie on diagonals. 2
[Assuming the 2D Array to be a square matrix with odd dimension
i.e. 3×3, 5×5, 7×7 etc.]
Example, if the array content is
5 4 3
6 7 8
1 2 9
Output through the function should be :
Diagonal One : 5 7 9
Diagonal Two : 3 7 1