Browse » Home
»
multiple animated circles in c graphics
» C graphics program to darw multiple small animated circles
C graphics program to darw multiple small animated circles
C graphics program to darw multiple small animated circles
#include <graphics.h>
#include <conio.h>
#include <dos.h>
void main()
{
int d;
int m;
int x;
int y;
d=DETECT;
initgraph(&d,&m,"c:\\tc\\bgi");
for(x=10;x<630;x++)
{
for(int r=0;r<8;r++)
{
setcolor(r+3);
circle(x,5,r);
circle(x,25,r);
circle(x,45,r);
circle(x,65,r);
circle(x,85,r);
circle(x,105,r);
circle(x,125,r);
circle(x,145,r);
circle(x,165,r);
circle(x,185,r);
circle(x,205,r);
circle(x,225,r);
circle(x,245,r);
circle(x,265,r);
circle(x,285,r);
circle(x,305,r);
circle(x,325,r);
circle(x,345,r);
circle(x,365,r);
circle(x,385,r);
circle(x,405,r);
circle(x,425,r);
circle(x,445,r);
circle(x,465,r);
}
cleardevice();
}
getch();
closegraph();
}
Output :
When you run this program then u see multiple small circles animating and moving
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment