//traffic system
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int i;
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
for(i=0;i<600;i++)
{
outtextxy(30,50,"traffic system by Fensa Saj");
rectangle(50+i,300,100+i,400);
//traffic post
line(10,200,600,200);
line(500,180,500,200);
rectangle(475,80,525,180);
circle(500,100,10);
circle(500,130,10);
circle(500,160,10);
setfillstyle(1,2);
floodfill(500,160,15);
if(i==350)
{
setfillstyle(1,0);
floodfill(500,160,15);
setfillstyle(1,14);
floodfill(500,130,15);
delay(600);
setfillstyle(1,0);
floodfill(500,130,15);
setfillstyle(1,4);
floodfill(500,100,15);
delay(3000);
}
setfillstyle(1,2);
floodfill(500,160,15);
delay(40);
cleardevice();
}
getch();
}