//PROGRAM TO DRAW A CAR
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
intgd=DETECT,gm,flag=1;
initgraph(&gd,&gm,””);
while(!kbhit())
{ setfillstyle(1,WHITE);
floodfill(100,200,GREEN);
setcolor(RED);
line(100,200,170,200);
line(170,200,190,150);
line(190,150,290,150);
line(290,150,310,200);
line(310,200,380,200);
line(100,200,100,230);
line(100,230,170,230);
circle(190,230,20);
line(310,230,380,230);
circle(290,230,20);
line(210,230,270,230);
line(380,200,380,230);
rectangle(200,160,230,190);
rectangle(250,160,280,190);
if(flag==1)
{
line(190,210,190,250);
line(170,230,210,230);
line(290,210,290,250);
line(270,230,310,230);
flag=0;
}
else
{
line(176,244,204,216);
line(176,216,204,244);
line(276,216,304,244);
line(276,244,304,216);
flag=1;
}
delay(100);
}
}