C++ program to print the transpose of a given matrix
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out ——————————————————————————————————————————— Program to print the transpose of a given matrix ——————————————————————————————————————————— Enter the number of row(s) 2 Enter the number of column(s) 3 Enter elements for matrix A [1][1]=1 [1][2]=2 [1][3]=3 [2][1]=4 [2][2]=5 [2][3]=6 Matrix A is 1 2 3 4 5 6 The transpose of matrix A is 1 4 2 5 3 6 ——————————————————————————————————————————— kodingwindow@kw:~$
What Next?
C++ program for addition of two matrices
C++ program for addition and subtraction of two matrices
C++ Classes
Advertisement