admin
|
|
« Odpowiedz #1 : Marzec 28, 2011, 09:34:00 » |
|
program misio; uses crt,dos; var tablica: array[1..5,1..5] of char; x,y:byte; procedure celownik; begin tablica[1,3]:='-'; tablica[2,3]:='-'; tablica[3,1]:='|'; tablica[3,2]:='|'; tablica[3,3]:='+'; tablica[3,4]:='|'; tablica[3,5]:='|'; tablica[4,3]:='-'; tablica[5,3]:='-'; end;
procedure wysw(var a,b:byte); var x,y:byte; begin for x:=1 to 5 do begin for y:=1 to 5 do begin gotoxy(a+x,b+y); write(tablica[x,y]);end; end; end; procedure ruch; var z:char; q,w:byte; begin q:=10;w:=10; repeat z:=readkey; if z='a' then q:=q-1; if z='s' then q:=q+1; wysw(q,w); until z='q'; end;
begin clrscr; celownik;ruch;readkey; end.
|