help me... I cant wok a bit. Question

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
Elements of D1 are at [i][i], elements of D2 are at [i][size-i-1], where i goes from 0 to size.
Topic archived. No new replies allowed.