//PROGRAM TO FIND THE TRANSPOSE OF THE ENTERED MATRIX
/*MADE BY KRISHNA AGARWAL*/
#include<iostream>
using namespace std;
int main()
{
int i,j,a[10][10],order;
cout<<"enter the order of the matrix\n";
cin>>order;
cout<<" please enter the value of all elements of the matrix\n";
for(i=0;i<order;i++)
{
for(j=0;j<order;j++)
cin>>a[i][j];
}
cout<<" \nHERE IS YOUR ENTERED MATRIX\n";
for(i=0;i<order;i++)
{
for(j=0;j<order;j++)
cout<<a[i][j]<<" ";
cout<<endl;
}
cout<<"HERE IS THE TRANSPOSE OF THE ABOVE ENTERED MATRIX\n";
for(j=0;j<order;j++)
{
for(i=0;i<order;i++)
cout<<a[i][j]<<" ";
cout<<endl;
}
return 0;
}
/*MADE BY KRISHNA AGARWAL*/
#include<iostream>
using namespace std;
int main()
{
int i,j,a[10][10],order;
cout<<"enter the order of the matrix\n";
cin>>order;
cout<<" please enter the value of all elements of the matrix\n";
for(i=0;i<order;i++)
{
for(j=0;j<order;j++)
cin>>a[i][j];
}
cout<<" \nHERE IS YOUR ENTERED MATRIX\n";
for(i=0;i<order;i++)
{
for(j=0;j<order;j++)
cout<<a[i][j]<<" ";
cout<<endl;
}
cout<<"HERE IS THE TRANSPOSE OF THE ABOVE ENTERED MATRIX\n";
for(j=0;j<order;j++)
{
for(i=0;i<order;i++)
cout<<a[i][j]<<" ";
cout<<endl;
}
return 0;
}
No comments:
Post a Comment