Professional Documents
Culture Documents
Transpose Matrix
Transpose Matrix
Converting rows of a matrix into columns and columns of a matrix into row is called transpose of a matrix.
In this program, we will use a separate matrix to store the transpose elements.
Algorithm
1. Start
2. Declare variables for matrix rows and columns.
3. Ask the user to initialize the rows and columns.
4. Declare a matrix.
5. Ask the user to initialize the matrix elements.
6. Print the original matrix.
7. Declare another matrix that will store the transpose matrix element.
8. Store the elements in the transpose matrix by altering the rows and columns of
the original matrix.
9. Display the transpose matrix.
10. Stop.
public class transpose {