Problem Statement
Write a C program that reads the order N(≤ 20) of a square matrix over data of type
double. Then it reads the matrix in row-major order in a 2-D array (type double).
It prints the input data,
It prints the matrix in diagonal
order,
It prints the matrix in anti-diagonal order, and
It prints the matrix in anti-clockwise spiral order
i.e when the metrics is
1 2 3
4 5 6
7 8 9
then Diagonal
order: 7 4 8 1 5 9 2 6
3
Anti-Diagonal
order: 1 2 4 3 5 7 6 8
9
Anticlockwise-Spiral order: (odd order matrix) 1, 4, 7, 8, 9, 6, 3, 2, 5
and so on