uses CRT, Graph;
var test :Char;
Device, Mode :integer;
PROCEDURE redd;
BEGIN
SetFillStyle (1, Red);
Circle (200, 200, 20);
Floodfill (200, 200, White);
END;
PROCEDURE Yelow;
Begin
SetFillStyle (1, Yellow);
Circle (200, 240, 20);
Floodfill (200, 240, White);
End;
PROCEDURE Gren;
Begin
SetFillStyle (1, Green);
Circle (200, 280, 20);
Floodfill (200, 280, White);
End;
Begin
Device:=0;
InitGraph (Device, Mode, 'C:\FPC\2.4.0\units');
setcolor (White);
repeat
Rectangle(175,175,225,305);
Circle (200, 200, 20);
Circle (200, 240, 20);
Circle (200, 280, 20);
test:=Readkey;
if test='r' then redd;
if test='y' then Yelow;
if test='g' then Gren;
until test='q'
END.