Program in Java for Transpose of matrix

Transpose of  matrix in Java :

Transpose of matrix is the matrix in which the element at row, r and column, c in the original is placed at row c and column r of the transpose. Transpose of a matrix is obtained by replacing row by columns and column by rows in a matrix.

Here, is the program in java to input a matrix and print its transpose.

Source Code :

Output :

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

Leave a Reply

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