#include #include #include #include struct POINT { int x,y; }; void main() { int Drv,mode,lo,sh,i,n; struct POINT p1; float r1,r2,inc,k,tmp; printf("give me the circulus point -->"); scanf("%d %d",&p1.x,&p1.y); printf("give me the k -->"); scanf("%f",&k); printf("give me how many no. of fan -->"); scanf("%d",&n); Drv=DETECT; initgraph(&Drv,&mode,""); setcolor(14); for (i=0; i<360; i++) { inc=i*3.14159/180.0; tmp=k*cos(n*inc); r1=tmp*cos(inc); r2=tmp*sin(inc); if (i == 0) moveto(p1.x+r1,p1.y+r2); else lineto(p1.x+r1,p1.y+r2); delay(300); } getche(); closegraph(); }