|
|
back to boardhelp me #include <stdio.h> #include<conio.h> main() { int x[100][100],a,i,j; scanf("%d",&a); for( i = 0 ; i < a ; i++ ) for( j = 0 ; j < a ; j++ ) scanf("%d",&x[i][j]); for( i = 0 ; i < a ; i++ ) for( j = 0 ; j <= i ; j++ ) printf("%d ",x[i-j][j]); for( i = a ; i < 2 * a - 1 ; i++ ) for( j = a - 1 ; j >= i - 3 ; j-- ) printf("%d ",x[j][i-j]); getch(); } |
|
|