uses graph, crt; var d,m,x,y:integer; G : string; begin d:=detect; Initgraph(d,m, ' '); outtextxy(120,20,' h-left, j-down, k-high, l-right, cancel- Esc'); setcolor(green); x:=320; y:=240; rectangle(150,150,400,400); setcolor(15); repeat G:=readkey; if G='h' then begin if x>160 then dec(x,5); end; if G='j' then begin if y<390 then inc(y,5); end; if G='k' then begin if y>160 then dec(y,5); end; if G='l' then begin if x<390 then inc(x,5); end; circle(x,y,10); until G=chr(27); Closegraph; end.