#include #include #include #include struct POINT { int x,y; }; void main() { int Drv,mode,r,be,en,i; struct POINT p1; float r1,r2,k; printf("give me the circulus point -->"); scanf("%d %d",&p1.x,&p1.y); printf("give me the radius -->"); scanf("%d",&r); printf("give me the begin and end angle -->"); scanf("%d %d",&be,&en); Drv=DETECT; initgraph(&Drv,&mode,""); setcolor(14); arc(p1.x,p1.y,be,en,r); getche(); setcolor(6); for (i=be; i<=en; i++) { k=i*3.14159/180; r1=r*cos(k); r2=r*sin(k); if (i == be) { moveto(p1.x+r1,p1.y+r2); } else lineto(p1.x+r1,p1.y+r2); } getche(); closegraph(); }