-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1534.c
35 lines (33 loc) · 832 Bytes
/
1534.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>
#include <stdlib.h>
int main(){
int c[70][70];
int a,i,j,x=0,y;
while(scanf("%d",&a)!=EOF){
y = a-1;
x=0;
for(i=0;i<a;i++){
for(j=0;j<a;j++){
if((i==0)&&(j==0)){
c[i][j] = 1;
printf("%d",c[i][j]);
}else if ((i==x)&&(j==y)){
c[i][j] = 2;
printf("%d",c[i][j]);
}else{
if(j==i){
c[i][j] = 1;
printf("%d",c[i][j]);
}else{
c[i][j] = 3;
printf("%d",c[i][j]);
}
}
}
printf("\n");
x++;
y--;
}
}
return 0;
}