Write a program that creates a two dimension matrix of size N x N (N is larger than 4). Through a menu, the user can choose to perform the following operation to the matrix.
1 - Rotate the matrix around the diagonal (function name rotateDiagonal)
Example for 3 x 3 matrix :
1 2 3 - 1 4 7
4 5 6 - 2 5 8
7 8 9 - 3 6 9
2 - Rotate the matrix around the middle row (function name rotateRow)
1 2 3 - 7 8 9
4 5 6 - 4 5 6
7 8 9 - 1 2 3
3 - Rotate the matrix around the middle column (function name rotateColumn)
1 2 3 - 3 2 1
4 5 6 - 6 5 4
7 8 9 - 9 8 7
4 - Set the upper triangle to zero (function name setUpperZero)
1 2 3 - 1 0 0
4 5 6 - 4 5 0
7 8 9 - 7 8 9
Write your program such that the user enters the values of the matrix, and each operation of the above is performed by a function as indicated above. Use the (switch) structure to call the functions.
The user menu can be as follows
1 - Enter Matrix Values
2 - Rotate around Diagonal
3 - Rotate around the middle row
4 - Rotate around the middle column
5- Set the upper triangle to zero
Enter your option ?
we cant seem to start with this program..
we seek help from C language experts in sorting out this problem and has the know-how knowledge to get us onto the right track..
please do help us..