-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcase59.c
More file actions
52 lines (52 loc) · 1.39 KB
/
Copy pathcase59.c
File metadata and controls
52 lines (52 loc) · 1.39 KB
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
// // 题目:画图,综合例子。(在TC中实现)。
// # define PAI 3.1415926
// # define B 0.809
// # include "graphics.h"
// #include "math.h"
// int main()
// {
// int i,j,k,x0,y0,x,y,driver,mode;
// float a;
// driver=CGA;mode=CGAC0;
// initgraph(&driver,&mode,"");
// setcolor(3);
// setbkcolor(GREEN);
// x0=150;y0=100;
// circle(x0,y0,10);
// circle(x0,y0,20);
// circle(x0,y0,50);
// for(i=0;i<16;i++)
// {
// a=(2*PAI/16)*i;
// x=ceil(x0+48*cos(a));
// y=ceil(y0+48*sin(a)*B);
// setcolor(2); line(x0,y0,x,y);
// }
// setcolor(3);circle(x0,y0,60);
// /* Make 0 time normal size letters */
// settextstyle(DEFAULT_FONT,HORIZ_DIR,0);
// outtextxy(10,170,"press a key");
// getch();
// setfillstyle(HATCH_FILL,YELLOW);
// floodfill(202,100,WHITE);
// getch();
// for(k=0;k<=500;k++)
// {
// setcolor(3);
// for(i=0;i<=16;i++)
// {
// a=(2*PAI/16)*i+(2*PAI/180)*k;
// x=ceil(x0+48*cos(a));
// y=ceil(y0+48+sin(a)*B);
// setcolor(2); line(x0,y0,x,y);
// }
// for(j=1;j<=50;j++)
// {
// a=(2*PAI/16)*i+(2*PAI/180)*k-1;
// x=ceil(x0+48*cos(a));
// y=ceil(y0+48*sin(a)*B);
// line(x0,y0,x,y);
// }
// }
// restorecrtmode();
// }