Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {*program losuje do tablicy tab1 10 liczb całkowitych <0,20>
- Nastepnie przesuwa elementy w tablicy wg zasady
- 1 ->2
- 2 ->3
- ....
- ostatni ->pierwszy
- wypisuje elementy po zamianie
- przykład
- przed 3 4 1 6 4 2
- po 2 3 4 1 6 4
- uwaga! nie stosować żadnej tablicy pomocniczej*}
- Program test;
- var
- tab1:array[0..20] of integer;
- i,n:integer;
- begin
- randomize;
- for i:=1 to 10 do
- begin
- tab1[i]:=random(21);
- write(tab1[i]:3);
- end;
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement