Java program to print the transpose of a given matrix
KW.java
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW ——————————————————————————————————————————— Program to find the transpose of a given matrix ——————————————————————————————————————————— Enter the number of rows 3 Enter the number of columns 3 Enter the elements of matrix 1 2 3 4 5 6 7 8 9 Entered matrix is 1 2 3 4 5 6 7 8 9 Transpose of matrix is 1 4 7 2 5 8 3 6 9 ——————————————————————————————————————————— kodingwindow@kw:~$
What Next?
Java Classes
Advertisement