-
Notifications
You must be signed in to change notification settings - Fork 0
/
函数之简单图形.c
155 lines (133 loc) · 2.51 KB
/
函数之简单图形.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#include <stdio.h>
#include <windows.h>
void jiandantuxin()
{
/////////////////////正直三角//////////////////////
printf ("=========正直三角=======\n\n");
for (int n1=1;n1<=11;n1++)
{
for(int x1=1;x1<=2;x1++)
{
printf (" ");
}
for(int kg1=1;kg1<=n1;kg1++)
{
printf("*");
}
printf("\n");
Sleep(200);
}
Sleep(300);
/////////////////////倒直三角////////////////////////
printf ("\n=======倒直三角==========\n\n");
Sleep(200);
for(int n2 = 1; n2 <= 13; n2++)
{
for(int kg2 = 0; kg2 <= n2; kg2++)
{
printf(" ");
}
for(int x2=1;x2<=13-n2;x2++)
{
printf("*");
}
printf("\n");
Sleep(200);
}
Sleep(300);
system("PAUSE");
system("CLS");
///////////////////////正三角////////////////////////
printf("============正三角==============\n");
for(int n3=0;n3<=13;n3++)
{
for(int kg3 = 1;kg3 <= 15 - n3; kg3++)
{
printf(" ");
}
for(int x3 = 1; x3 <= 2 * n3-1; x3++)
{
printf("*");
}
printf("\n");
Sleep(200);
}
Sleep(300);
//////////////////////倒三角/////////////////////////
printf("\n\n============倒三角=============\n\n");
Sleep(300);
for(int n4 = 2; n4 <= 15; n4++)
{
for(int kg4 = 0; kg4 <= n4; kg4++)
{
printf(" ");
}
for(int x4=1;x4<=28-(2*n4-1); x4++)
{
printf("*");
}
printf("\n");
Sleep(200);
}
Sleep(300);
system("PAUSE");
system("CLS");
///////////////////////棋盘/////////////////////////
printf("===========棋盘=============\n\n");
for(int n5 = 1; n5 <= 5; n5++)
{
printf("|");
for(int kg4 = 0; kg4 <= 5; kg4++)
{
printf("■ ");
}
printf("|\n");
printf("|");
for(int kg5 = 0; kg5 <= 5; kg5++)
{
printf(" ■");
}
printf("|\n");
Sleep(200);
}
Sleep(300);
system("PAUSE");
system("CLS");
///////////////////////////////心形////////////////////////////
printf("==========================心形============================\n\n");
for(int n6 = 1; n6 <= 5; n6++)
{
for(int kg1=1; kg1<15-2*n6; kg1++)
{
printf(" ");
}
for(int x1=1; x1<=4*n6+4; x1++)
{
printf("*");
}
for(int kg1_1=1; kg1_1<=20-4*n6; kg1_1++)
{
printf(" ");
}
for(int x1_1=1; x1_1<=4*n6+4; x1_1++)
{
printf("*");
}
printf("\n");
Sleep(200);
}
for(int n7=1;n7<=15;n7++)
{
for(int kg3=0;kg3<=2*n7;kg3++)
{
printf(" ");
}
for(int x3=1;x3<=53-(4*n7-1);x3++)
{
printf("*");
}
printf("\n");
Sleep(200);
}
Sleep(300);
}