C++ Program fot the Transpose of matrix.This c++ program prints transpose of a matrix. It is obtained by
interchanging rows and columns of a matrix. When we transpose a matrix then the order of matrix changes, but for a square matrix order remains same.
Source Code:-
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int a[10][10],b[10][10],i,j,m,n;
cout<<"Program for Transpose of Matrix by-Tarun Rawat\n\n";
cout<<"Enter number of row in matrix : ";
cin>>m;
cout<<"Enter number of column in matrix : ";
cin>>n;
cout<<"\nEnter elements in an matrix : ";
for(i=0;i<m;i++)
{for(j=0;j<n;j++)
{cin>>a[i][j];
}
}
cout<<"\nInput matrix : \n";
for(i=0;i<m;i++)
{for(j=0;j<n;j++)
{cout<<a[i][j]<<" ";
}
cout<<"\n";
}
for(i=0;i<m;i++)
{for(j=0;j<n;j++)
{b[i][j]=a[j][i];
}
}
cout<<"\nTranspose matrix : \n";
for(i=0;i<m;i++)
{for(j=0;j<n;j++)
{cout<<b[i][j]<<" ";
}
cout<<"\n";
}
getch();
}
Welcome to " way2cplusplus.blogspot.in " Objective of this blog is to implement various Computer Science Engineering Lab problems into C++ programming language. These are basically most common Lab Exercise problems based on the curriculum of engineering colleges throughout the Nation. These lab exercises are also relevant to Data structure. Simply C++ programming zone...
Best casino games you can play for free - drmcd
ReplyDeleteNo 이천 출장안마 deposit casino bonuses are exactly what they sound 남양주 출장샵 like, but some you might be interested in can play at top 영천 출장샵 casino sites 파주 출장샵 with Jul 21, 2019 목포 출장안마 · Uploaded by Casino Royale
joya shoes 415d6mzkza079 outdoor,INSOLES,Joya Shoe Care,walking,fashion sneaker,boots joya shoes 884v4ommnq692
ReplyDelete