#include<stdio.h> main() { int N,i,j,t; scanf("%d",&N); int a[100][100]; 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++){ if(i<j) { t=a[i][j]; a[i][j]=a[j][i]; a[j][i]=t; } } } for(i=0;i<N;i++) { for(j=0;j<N;j++) { printf("%d",a[i][j]); } printf("\n"); } /* Main.c:2:1: warning: return type defaults to 'int' main() ^ Main.c: In function 'main': Main.c:32:2: error: expected declaration or statement at end of input } ^ */ |
Double click to view unformatted code.