### C++ program to show matrix transpose

## Matrix transpose

This program illustrate the concept of matrix transpose.Matrix transpose means changing row into coloumns and coloumns into row.

- Here in this program “i” is number of rows and “j” is number of coloumns.
- a[3][3] is the name of matrix and it also repersent the size of matrix i.e. 3 X 3 means user can input maximum 3 rows and coloumns.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#include<iostream.h> #include<conio.h> void main() { clrscr(); int a[3][3],i,j; cout<<"Enter Matrix row wise:-\n"; for(i=0;i<3;i++) { for(j=0;j<3;j++) { cin>>a[i][j]; } } cout<<"Transpose of Matrix is:-\n"; for(i=0;i<3;i++) { for(j=0;j<3;j++) { cout<<"\t"<<a[j][i]; } cout<<"\n"; } getch(); } |

#### OUTPUT:-

#### Transpose matrix concept

#### Comment below if you are facing any problem

#### Also read

C++ program to show addition and subtraction of two matrix

How to transpose a entered matrice in java program

C program to multiply two matrix