Animation circles filled with different colors and patterns.

 Write a program to draw animation using increasing circles filled with different patterns.

  • program:

#include<graphics.h>

#include<conio.h>

void main()

{

intgd=DETECT, gm, i, x, y;

intigraph(&gd, &gm, “C:\\TC\\BGI”);

x=getmax x()/3;

y= getmax x()/3;

setbkcolor(white);

setcolor(blue);

for(i=1;i<=8;i++)

      {

setfillstyle(i,i);

delay(20);

circle(x, y, i*20);

floodfill(x-2 + i*20, y, blue);

        }

getch();

closegraph();

}

  • output:

Leave a comment

Design a site like this with WordPress.com
Get started