#include "graphics.h"
#include "stdlib.h"
#include "conio.h"
#include "dos.h"
void main()
{
int gdriver=VGA,gmode=VGAMED,i,j,k;
int x[100],y[100];
initgraph(&gdriver,&gmode,"D:\\TC\\BGI");
for (i=1;i<=100;i++)
{
x[i]=(int)(random(640));
y[i]=(int)(random(350));
putpixel(x[i],y[i],3);
//delay(50);
}
for (k=1;k<=10;k++)
{
for (i=1;i<=100;i++)
putpixel(x[i],y[i],3);
for (j=1;j<=100;j++)
{
putpixel(x[j],y[j],0);
delay(50);
putpixel(x[j]+1,y[2*j],3);
delay(80);
putpixel(x[j],y[j],0);
}
for (i=1;i<=100;i=i+2)
{
putpixel(x[i]+1,y[i],3);
delay(100);
}
for (j=1;j<=100;j=j+1)
{
putpixel(x[j],y[j],3);
}
cleardevice();
}
getch();
closegraph();
}