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
|
#include<graphics.h>
#include<conio.h>
#include<dos.h>
main()
{
int gd = DETECT, gm, x, y, color, angle = 90;
struct arccoordstype a, b;
initgraph(&gd, &gm, "C:\\TC\\BGI");
delay(2000);
while(angle<=450)
{
setcolor(BLACK);
arc(getmaxx()/2,getmaxy()/2,angle,angle+2,100);
setcolor(RED);
getarccoords(&a);
circle(a.xstart,a.ystart,25);
setcolor(BLACK);
arc(getmaxx()/2,getmaxy()/2,angle,angle+2,150);
getarccoords(&a);
setcolor(GREEN);
circle(a.xstart,a.ystart,25);
angle = angle+5;
delay(50);
}
getch();
closegraph();
}
|