program mozgato; uses crt; var c:char; x,y:byte; begin clrscr; writeln('x-re lepunk ki, a kurzormozgato billentyukkel mozgunk'); x:=40; y:=13; gotoxy(x,y); write('O'); c:=readkey; repeat if c=#0 then begin c:=readkey; {mivel a kurzormozgatoknak a 2. kodja a lenyeges} case c of #72: if y>1 then dec(y); #80: if y<25 then inc(y); #75: if x>1 then dec(x); #77: if x<79 then inc(x); end end; ClrScr; gotoxy(x,y); write('O'); c:=readkey; until c='x'; end.