#include<stdio.h>
int main()
{
int i,j;
long int a[3][4],b[4][3];
for (i=0;i<3;i++)
{
for (j=0;j<4;j++)
{
printf("Enter the matrix [%d][%d]",i,j);
scanf("%d",&a[i][j]);
}
}
for (i=0;i<3;i++)
{
for (j=0;j<4;j++)
{
printf("%d\t",a[i][j]);
}
printf("\n");
printf("Transpose is %d\t",a[j][i]);
printf("\n");
}
}
int main()
{
int i,j;
long int a[3][4],b[4][3];
for (i=0;i<3;i++)
{
for (j=0;j<4;j++)
{
printf("Enter the matrix [%d][%d]",i,j);
scanf("%d",&a[i][j]);
}
}
for (i=0;i<3;i++)
{
for (j=0;j<4;j++)
{
printf("%d\t",a[i][j]);
}
printf("\n");
printf("Transpose is %d\t",a[j][i]);
printf("\n");
}
}
0 Comments