#include<stdio.h> int main() { int a[6][6],n,i,j; scanf("%d",&n); for(i=0;i<n;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); for(i=0;i<n;i++) for(j=0;j<n;j++) {printf("%4d",a[j][i]); printf("\n");} return 0; }
#include<stdio.h> int main() { int a[6][6],n,i,j; scanf("%d",&n); for(i=0;i<n;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); for(i=0;i<n;i++) {for(j=0;j<n;j++) printf("%4d",a[j][i]); printf("\n");} return 0; }
标签:include,转置,scanf,括号,int,main,方阵 From: https://www.cnblogs.com/nanwu123/p/17819480.html