#include #include #include #include struct POINT { int x,y; }; void main() { int Drv,mode,lo,sh,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 long and short length -->"); scanf("%d %d",&lo,&sh); Drv=DETECT; initgraph(&Drv,&mode,""); setcolor(3); ellipse(p1.x,p1.y,0,360,lo,sh); getche(); clearviewport(); for (i=0; i<=90; i++) { k=i*3.14159/180.0; r1=lo*cos(k); r2=sh*sin(k); putpixel(p1.x+r1,p1.y+r2,5); putpixel(p1.x-r1,p1.y+r2,6); putpixel(p1.x-r1,p1.y-r2,7); putpixel(p1.x+r1,p1.y-r2,8); } getche(); closegraph(); }