c语言如何通过定义函数来转置矩阵?答:include <stdio.h> int main(){ struct aaa { int x;int y;};struct aaa t,a[3][3]= {0,0,0,1,0,2,1,0,1,1,1,2,2,0,2,1,2,2};int i,j;for(i=0; i<3; i++){ for(j=0; j<3; j++)printf("[%d,%d] ",a[i][j].x,a[i][j].y);printf("\n");...
编写程序,实现矩阵的转置(行、列元素互换)。答:define N 3 fun(int a[N][N] ){ int i,j,t;for( i=0;i<N;i++ )for( j=0;j<i;j++ ){ t=a[i][j];a[i][j]=a[j][i];a[j][i]=t;} } main(){ int a[N][N]={1,2,3,4,5,6,7,8,9};printf("原始数据:\n\n");Print( a );fun(a );printf("\n...