-
Notifications
You must be signed in to change notification settings - Fork 0
/
13015.c
74 lines (73 loc) · 1019 Bytes
/
13015.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <stdio.h>
int main(void){
int n,i,j;
scanf("%d",&n);
for (i=0;i<n;i++){
printf("*");
}
for (i=0;i<2*n-3;i++){
printf(" ");
}
for (i=0;i<n;i++){
printf("*");
}
printf("\n");
for (i=1;i<n-1;i++){
for (j=0;j<i;j++){
printf(" ");
}
printf("*");
for (j=0;j<n-2;j++){
printf(" ");
}
printf("*");
for (j=0;j<2*n-3-2*i;j++){
printf(" ");
}
printf("*");
for (j=0;j<n-2;j++){
printf(" ");
}
printf("*\n");
}
for (i=0;i<n-1;i++){
printf(" ");
}
printf("*");
for (i=0;i<n-2;i++){
printf(" ");
}
printf("*");
for (i=0;i<n-2;i++){
printf(" ");
}
printf("*\n");
for (i=n-2;i>0;i--){
for (j=0;j<i;j++){
printf(" ");
}
printf("*");
for (j=0;j<n-2;j++){
printf(" ");
}
printf("*");
for (j=0;j<2*n-3-2*i;j++){
printf(" ");
}
printf("*");
for (j=0;j<n-2;j++){
printf(" ");
}
printf("*\n");
}
for (i=0;i<n;i++){
printf("*");
}
for (i=0;i<2*n-3;i++){
printf(" ");
}
for (i=0;i<n;i++){
printf("*");
}
return 0;
}