#include<math.h>
#include<graphics.h>
#define PI 3.14159
#define D 100
main()
{ float a,e,x1,y1,x2,y2;
int gdriver=VGA,gmode=VGAHI;
initgraph(&gdriver,&gmode,"d:\\tc");
cleardevice();
gotoxy(26,26);
printf("感谢使用由第九组成员编写的程序\n");
printf("组长:刘明明\n");
printf("成员:刘刚,申时永,张琴,简孝文\n");
setcolor(GREEN); setbkcolor(0);
for(a=0.0;a<2*PI;a+=2*PI/720)
{
e=D*(1+sin(4*a));
x1=320+e*cos(a);
x2=320+e*cos(a+PI/5);
y1=240+e*sin(a);
y2=240+e*sin(a+PI/5);
line(x1,y1,x2,y2);
}
getch();
closegraph(); }
评论