Write A C Program To Find Out Transport Of A Matrix
Solution:
#include<stdio.h>
int main(){
int a[10][10],b[10][10],i,j,k=0,m,n;
printf("\nEnter the row and column of matrix");
scanf("%d %d",&m,&n);
printf("\nEnter the First matrix->");
for(i=0;i<m;i++)
for(j=0;j<n;j++)
scanf("%d",&a[i][j]);
printf("\nThe matrix is\n");
for(i=0;i<m;i++){
printf("\n");
for(j=0;j<m;j++){
printf("%d\t",a[i][j]);
}
}
for(i=0;i<m;i++)
for(j=0;j<n;j++)
b[i][j]=0;
for(i=0;i<m;i++){
for(j=0;j<n;j++){
b[i][j]=a[j][i];
printf("\n%d",b[i][j]);
}
}
printf("\n\nTraspose of a matrix is -> ");
for(i=0;i<m;i++){
printf("\n");
for(j=0;j<m;j++){
printf("%d\t",b[i][j]);
}
}
return 0;
}
More C Program :
- Write a c program to find out transport of a matrix
- c program to find transpose of a matrix without using another matrix
- write a program to find transpose of a matrix using function
- program to find transpose of a matrix in c++
- multiplication of a matrix in c
- transpose of a matrix in c without using second matrix
- transpose of a matrix in c using pointers
- write a program to find the inverse of a matrix
- transpose of a 3x3 matrix in c