uses graph, crt; var raadius,d,m,varv1,x,y:integer; varv: string; c:char; begin writeln ('Kui suure pliiatsiga tahad joonistada(1-10)'); readln(raadius); writeln('Mis v„rvi pliiatsiga joonistada tahad (punase/kollase/rohelise/valge/sinise)'); readln(varv); if varv='punase' then varv1:=red else if varv='sinise' then varv1:=blue else if varv='kollase' then varv1:=yellow else if varv='rohelise' then varv1:=green else if varv='valge' then varv1:=white; d:=detect; InitGraph(d, m, ''); rectangle(0,0,635,450); outtextxy(10,460,'Kui tahad l“petada vajuta L'); x:=40; y:=40; repeat begin setcolor(varv1); setfillstyle(linefill,varv1); fillellipse(x,y,raadius,raadius); c:=ReadKey; begin if (c='K') and (x>1+raadius) then x:=x-1; if (c='M') and (x<634-raadius) then x:=x+1; if (c='H') and (y>1+raadius) then y:=y-1; if (c='P') and (y<449-raadius) then y:=y+1; end; end; until (c=chr(108)) or (c=chr(76)); closegraph; end.