#include
#define MAX 20
int m,n;
void transpose(double a[][MAX],double b[][MAX])
{
int i,j;
for(i=0;i
}
void main()
{
int i,j;
double a[MAX][MAX],b[MAX][MAX];
puts("Please input the dimensions of the matrixe:");
puts("(in term of “2 3”).");
scanf("%d %d",&m,&n);
puts("Enter the matrix:");
for(i=0;i
transpose(a,b);
puts("The Transpose as follow:");
for(i=0;i
for(j=0;j
if(b[i][j]-int(b[i][j])!=0)
printf("%lf ",b[i][j]);
else
printf("%d ",int(b[i][j]));
}
puts("");
}
}
//我这个能实现任意大小的,还有提示输入输出