#include"stdio.h" int main(){ int n,a[100][100],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("%d",a[j][i]); printf("\n"); return 0; } /* Main.c: In function 'main': Main.c:4:3: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=] scanf("%d",n); ^ Main.c:7:25: error: expected ')' before ';' token scanf("%d",a[i][j]; ^ Main.c:13:1: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=] } ^ Main.c:13:1: error: expected ';' before '}' token */ |
Double click to view unformatted code.