#include<stdio.h>
int main()
{
int n,m,a[100][100],i,j;
printf("Enter row and col:");
scanf("%d%d",&n,&m);
printf("Matrix A :
");
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
printf("a[%d][%d] :",i,j);
scanf("%d",&a[i][j]);
}
}
printf("Transpose of Matrix :
");
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
printf("%d ",a[j][i]);
}
printf("
");
}
}