You are on page 1of 1

#include<stdio.

h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<tdlib.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\\turboC3\\bgi");
int x=10; int y=10;
int ix=1; int iy=1;
while (!kbhit())
{
circle(x,y,20);
circle (x,y,19);
circle (x,y,18);
circle (x,y,17);
circle (x,y,16);
circle (x,y,15);
circle (x,y,14);
circle (x,y,13);
circle (x,y,12);
circle (x,y,11);
circle (x,y,10);
circle (x,y,9);
circle (x,y,8);
circle (x,y,7);
circle (x,y,6);
circle (x,y,5);
setcolor(GREEN);
cleardevice();
x=x+ix;
y=y+iy;
if (y>=getmaxy())
iy=-1;
if(x>=getmaxx())
ix=-1;
if(y<=0)
iy=+1;
if(x<=0)
ix=+1;
}
closegraph();
getch();
}

You might also like