Program in Java to print matrix

Print matrix in Java :

Here is the program to input a matrix from a user and traverse and print it using for loop.

Source Code :

Output :

Enter the size of matrices (nxm) :
2
2
Input Matrix :
4
45
5
265
Matrix is :
4  45
5  265

Leave a Reply

Your email address will not be published. Required fields are marked *