#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm,i,midx,midy;
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
midx=getmaxx()/2;
midy=getmaxy()/2;
for(i=0;i<=50;i++)
{
circle(midx,midy+i,i);
circle(midx,midy-i,i);
circle(midx-i,midy,i);
circle(midx+i,midy,i);
setcolor(i);
}
for(i=0;i<=50;i++)
{
circle(midx-100,midy-100+i,i);
circle(midx-100,midy-100-i,i);
circle(midx-100+i,midy-100,i);
circle(midx-100-i,midy-100,i);
setcolor(i);
}
for(i=0;i<=50;i++)
{
circle(midx-100,midy+100+i,i);
circle(midx-100,midy+100-i,i);
circle(midx-100+i,midy+100,i);
circle(midx-100-i,midy+100,i);
setcolor(i);
}
for(i=0;i<=50;i++)
{
circle(midx+100,midy-100+i,i);
circle(midx+100,midy-100-i,i);
circle(midx+100+i,midy-100,i);
circle(midx+100-i,midy-100,i);
setcolor(i);
}
for(i=0;i<=50;i++)
{
circle(midx+100,midy+100+i,i);
circle(midx+100,midy+100-i,i);
circle(midx+100+i,midy+100,i);
circle(midx+100-i,midy+100,i);
setcolor(i);
}
getch();
closegraph();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.