Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program mrowisko;
- uses CRT;
- var
- tablica: array of array of integer;
- x,y,i,j,pole:integer;
- procedure plansza(x,y:integer); //rysuje pole symulacji
- var
- i,j,pole:integer;
- begin
- clrscr;
- writeln('Podaj szeroko† tablicy'); //x
- readln(x);
- writeln('Podaj dugo† tablicy'); //y
- readln(y);
- SetLength (tablica,x,y);
- begin
- for i:=1 to y do
- begin
- for j:=1 to x do
- begin
- case pole of
- '1':
- begin
- Textcolor(2); //zielony
- write('X');
- end;
- '2':
- begin
- Textcolor(6); //brazowy
- write('O');
- end;
- end;
- writeln;
- end;
- readln;
- end;
- end;
- begin
- plansza(x,y);
- end.
Add Comment
Please, Sign In to add comment