你什么编译器呢?这么牛,还会编译没错误?那一大堆的错误0 0,,
#include
void Transpose(int a[10][10],int m,int n)
{
int i,j,t;
for(i=0;i
for(j=0;j {
t=a[i][j];
a[i][j]=a[j][i];
a[j][i]=t;
}
}
}
int main()
{
int i,j;
int m,n;
int a[10][10];
printf("Input m, n:");
scanf("%d,%d",&m,&n);
printf("Input %d*%d matrix:\n",m,n);
for(i=0;i
for(j=0;j
scanf("%d",&a[i][j]);
}
}
for(i=0;i
for(j=0;j
printf("%4d",a[i][j]);
}
}
Transpose(a,m,n);
printf("The transposed matrix is:\n");
for(i=0;i
for(j=0;j
printf("%4d",a[i][j]);
}
}
return 0;
}
t=a[i][j];
a[j][i]=a[i][j];
a[i][j]=t;
该成
t=a[i][j];
a[i][j]=a[j][i];
a[j][i]=t;