Transpose of array A[2][2]={2,3,6,8) is
Options
O {2,6,3,8)
O (2,8.6,3)
O (8,6,3,2)
O (2,3,6,8)
Answers
Given :
To Find : Transpose
Solution:
Transpose of aij = aji
a₁₁ = 2
a₁₂ = 3
a₂₁ = 6
a₂₂ = 8
Transpose of A
a₁₁ a₂₁
a₁₂ a₂₂
2 6
3 8
is transpose of
is correct answer
Learn More:
order of the matrix (AB) transpose is 5 * 3 if A is a matrix of order 3x4 ...
https://brainly.in/question/9785304
#include<iostream>
using namespace std;
int main()
{
int r,c;
cout<<"Enter no. of rows : ";
cin>>r;
cout<<"Enter no. of columns : ";
cin>>c;
int A[r][c];
cout<<"Enter elements of the matrix from left to right (row wise) : "<<endl;
for(int i=0;i<r;i++)
{
for(int j=0;j<c;j++)
{
cin>>A[i][j];
}
}
cout<<"Original matrix :"<<endl;
for(int i=0;i<r;i++)
{
for(int j=0;j<c;j++)
{
cout<<A[i][j]<<" ";
}
cout<<endl;
}
cout<<"Transpose of matrix :"<<endl;
for(int i=0;i<c;i++)
{
for(int j=0;j<r;j++)
{
cout<<A[j][i]<<" ";
}
cout<<endl;
}
}