Read number of rows and columns, array elements for two dimensional array and print in matrix format using java program.
Example:
Input:
Enter number of rows: 3
Enter number of columns: 3
Enter elements
1
2
3
4
5
6
7
8
9
Output:
Matrix is:
1 2 3
4 5 6
7 8 9
Program to read and print two dimensional array (Matrix) in java
Output
need an explanation for this answer? contact us directly to get an explanation for this answer