慕田峪7331174
//#include "stdafx.h"//vc++6.0加上这一行.#include "stdio.h"void myprint(int (*p)[3]){int i,j;for(i=0;i<3;i++){for(j=0;j<3;printf("%3d",p[i][j++]));printf("\n");}}void mytranspose(int (*p)[3],int (*q)[3]){int i,j;for(i=0;i<3;i++)for(j=0;j<3;q[j][i]=p[i][j++]);}int main(void){int a[3][3]={{1,2,3},{4,5,6},{7,8,9}},b[3][3];printf("Before the transpose:\n");myprint(a);printf("After the transpose:\n");mytranspose(a,b);myprint(b);return 0;}