Graphics program to create a moving colored pattern circle
Graphics program to create a moving colored pattern circle
#include <graphics.h>
#include <conio.h>
#include <dos.h>
void main()
{
int d,m;
int x,y=30;
d=DETECT;
initgraph(&d,&m,"c:\\tc\\bgi");
for(x=30;x<530;x++)
{
cleardevice();
setfillstyle(6,2);
circle(x,y,20);
floodfill(x,y,15);
delay(15);
}
for(x=530;x>30;x--)
{
cleardevice();
setfillstyle(6,2);
circle(x,y,20);
floodfill(x,y,15);
delay(15);
}
getch();
closegraph();
}
Output :
On executing this program you will see a moving colored pattern circle...
Subscribe to:
Post Comments (Atom)
1 comments:
Nice
Post a Comment