9. Write a program to declare a matrix A [ ] [ ] of order (M × N) where ‘M’ is the number of rows and ‘N’ is
the number of columns such that both M and N must be greater than 2 and less than10. Allow the user to
input integers into this matrix. Display appropriate error message for an invalid input. Perform the
following tasks on the matrix.
(a) Display the input matrix
(b) Rotate the matrix by 2700 degrees anti clock wise and display the resultant matrix (c) Calculate
the sum of the odd elements of the matrix and display
Test your program for the following data and some random data:
Example 1
INPUT: M = 3 N = 4
ENTER ELEMENTS: 8, 7, 9, 3,-2, 0, 4, 5, 1, 3, 6, -4
OUTPUT:
ORIGINALMATRIX
8 7 9 3
-2 0 4 5
1 3 6 -4
ROTATED MATRIX ( 2700 ANTI CLOCK WISE )
1 -2 8 3
0 7 6 4
9 -4 5 3
SUM OF THE ODD ELEMENTS = 28
do this in java
easiest concept in the world pls
i cant understand ,pls

Answer :

Other Questions