#include <conio.h> //De aquí utilizaremos la función kbhit()
#include <stdlib.h> //De aquí sacaremos la función random()
#include <dos.h> //Usaremos esta librería por la función delay(int valor) que nos permite
//establecer un retardo en milisegundos.
#include <graphics.h> //Esta es la librería que nos permite usar gráficos.
void main()
{
int gdriver=DETECT, gmode, contador=0;
initgraph(&gdriver,&gmode,"C:\BORLANDC\BGI"); //Iniciamos el modo gráfico.
setbkcolor(11);
do
{
setbkcolor(11);
setcolor(11);
setlinestyle(0,0,2);
circle(450, 240,20);
line(290,120,445,220);
setcolor(11);
setlinestyle(0,0,2);
circle(270, 120,20);
line(270,125,150,240);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
circle(150,240,20);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
circle(110, 290,20);
line(150,240,110,290);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
line(150,240,70,350);
circle(70, 350,20);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
circle(130, 350,20);
line(110,290,130,350);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
circle(190, 350,20);
line(200,300,190,350);
setfillstyle(1,RED);
line(150,240,200,300);
setcolor(11);
setlinestyle(0,0,2);
circle(250, 350,20);
line(200,300,250,350);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
circle(200, 290,20);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
circle(410, 290,20);
line(410,290,445,240);
setfillstyle(1,RED);
setcolor(11);
setlinestyle(0,0,2);
circle(490, 290,20);
line(490,290,445,240);
setfillstyle(1,RED);
}
while(!kbhit()); //Si se pulsa alguna tecla, salimos del programa.
closegraph(); //Cerramos el modo gráfico.
}