#include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<iostream> using namespace std; int main(){ int n; int a[25][25]; scanf("%d",&n); for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ scanf("%d",&a[i][j]); } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ printf("%d",&a[j][i]); } printf("\n"); } return 0; } /* Main.cc: In function 'int main()': Main.cc:17:27: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int*' [-Wformat=] printf("%d",&a[j][i]); ^ Main.cc:23:1: error: expected '}' at end of input } ^ */ |
Double click to view unformatted code.