od Aďa » Ned 08. Apr 2012 15:36:10
No, malo by to byť asi takto:
program semafor;
uses grafika;
procedure cervena;
Begin
setcolor(15);
rectangle(270,80,370,400);
circle(320,240,40);
circle(320,330,40);
setcolor(4);
filledcircle(320,150,40);
End;
{*********************************************}
procedure cervenooranzova;
Begin
setcolor(15);
rectangle(270,80,370,400);
setcolor(6);
filledcircle(320,240,40);
setcolor(15);
circle(320,330,40);
setcolor(4);
filledcircle(320,150,40);
End;
{********************************************}
procedure zelena;
Begin
setcolor(15);
rectangle(270,80,370,400);
setcolor(0);
filledcircle(320,240,40);
setcolor(2);
filledcircle(320,330,40);
setcolor(0);
filledcircle(320,150,40);
End;
{*****************************************}
procedure oranzova;
Begin
setcolor(15);
rectangle(270,80,370,400);
setcolor(6);
filledcircle(320,240,40);
setcolor(0);
filledcircle(320,330,40);
setcolor(0);
filledcircle(320,150,40);
End;
{***************************************}
procedure cervena1;
Begin
setcolor(15);
rectangle(270,80,370,400);
setcolor(0);
filledcircle(320,240,40);
setcolor(0);
filledcircle(320,330,40);
setcolor(4);
filledcircle(320,150,40);
End;
{***********************************}
Begin
repeat
cervena;
delay(2000);
cervenooranzova;
delay(2000);
zelena;
delay(2000);
oranzova;
delay(2000);
cervena1;
until keypressed;
End.