Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
808 B
0
Indexable
Never
#include <stdio.h>

#include <conio.h>

#include<graphics.h>

void main()

{

int gd=DETECT,gm,i=10;

clrscr();

initgraph(&gd, &gm, "c:\\TC\\BGI");

while (i<=600)

{

 setcolor(YELLOW);



  //body of the car

  line(i,200,i+50,200);

  line(i,200,i-20,220);

  line(i+50,200,i+70,220);

  line(i+23,203,i+23,217);

  line(i+28,203,i+28,217);

  line(i-40,220,i+100,220);

  line(i-40,220,i-40,235);

  line(i+100,220,i+100,235);



  //wheels

  circle(i-10,235,7);

  circle(i-10,235,2);



  circle(i+70,235,7);

  circle(i+70,235,2);



  //lines beside of wheels

  line(i-40,235,i-17,235);

  line(i-3,235,i+63,235);

  line(i+100,235,i+77,235);



  i++;

  delay(10);

  cleardevice();

}

closegraph();

getch();


}