C graphics program to make a animated circle
C graphics program to make a animated circle
#include <graphics.h>
#include <conio.h>
#include <dos.h>
void main()
{
int d,m;
int c;
int x;
int color=0;
clrscr();
d=DETECT;
initgraph(&d,&m,"c:\\tc\\bgi");
for(x=20;x<110;x++)
{
delay(100);
setcolor(color++);
circle(150,150,x);
}
cleardevice();
for(x=110;x>=10;x--)
{
delay(100);
setcolor(color++);
circle(150,150,x);
}
getch();
closegraph();
}
Output :
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment