Featured
- Get link
- X
- Other Apps
C program to print transpose matrix
//C++ program to print transpose of a matrix
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int matrix[3][4],transpose_matrix[4][3];
int i,j;
cout<<"\nEnter numbers to fill matrix\n";
for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
{
cin>>matrix[i][j];
transpose_matrix[j][i]=matrix[i][j];
}
}
cout<<"Original Matrix:\n";
for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
{
cout<<matrix[i][j]<<" ";
}
cout<<"\n";
}
cout<<"\n\nTranspose of Matrix:\n";
for(i=0;i<4;i++)
{
for(j=0;j<3;j++)
{
cout<<transpose_matrix[i][j]<<" ";
}
cout<<"\n";
}
getch();
}
- Get link
- X
- Other Apps
Labels:
c program to print transpose of a matrix
how to print transpose of a matrix in C programming
transpose matrix program in C++
Popular Posts
C++ program to display numbers which get reversed after multiplying by 4
- Get link
- X
- Other Apps
Comments
Post a Comment