admin
|
|
« Odpowiedz #5 : Marzec 21, 2011, 13:00:29 » |
|
program rysio; uses crt,dos; var x,y:integer; statek: array[1..6,1..2] of char; procedure wprowadz; var x:integer; begin for x:=1 to 6 do statek[x,2]:=chr(178); statek[3,1]:=chr(221); end; procedure wysw(var a,b:integer); var x,y:integer; begin for y:=1 to 2 do begin for x:=1 to 6 do begin gotoxy(a+x,b+y);write(statek[x,y]);end; end; end;
begin clrscr; x:=30;y:=5; wprowadz; wysw(x,y);readkey; end.
-------------------------------------------------------------------------------- program rysio; uses crt,dos; var x,y:integer; statek: array[1..6,1..2] of char; procedure wprowadz; var x:integer; begin for x:=1 to 6 do statek[x,2]:=chr(178); statek[3,1]:=chr(221); end; procedure wysw(var a,b:integer); var x,y:integer; begin for y:=1 to 2 do begin for x:=1 to 6 do begin gotoxy(a+x,b+y);write(statek[x,y]);end; end; end; procedure ruch; var x,b,y:integer; begin x:=10;b:=1; y:=10; repeat x:=x+b; if((x>60) or (x<2)) then b:=-b; wysw(x,y);delay(100);clrscr; until keypressed; end;
begin clrscr; wprowadz; ruch;readkey; end. -------------------------------------------------------------- program rysio; uses crt,dos; var x,y:integer; statek: array[1..6,1..2] of char; procedure wprowadz; var x:integer; begin for x:=1 to 6 do statek[x,2]:=chr(178); statek[3,1]:=chr(221); end; procedure wysw(var a,b:integer); var x,y:integer; begin for y:=1 to 2 do begin for x:=1 to 6 do begin gotoxy(a+x,b+y);write(statek[x,y]);end; end; end; procedure ruch; var x,x1,b1,b,y,y1:integer; begin x:=10;b:=1; y:=10; x1:=10;b1:=2;y1:=15; repeat x:=x+b;x1:=x1+b1; if((x1>60) or (x1<2)) then b1:=-b1; if((x>60) or (x<2)) then b:=-b; wysw(x,y);wysw(x1,y1); delay(200);clrscr; until keypressed; end;
begin clrscr; wprowadz; ruch;readkey; end.
|