Const
b=10;
var
a: array[1..b] of integer;
i, j, k: integer;
begin
Randomize;
Write ('Pervonachalnii massiv: ');
for i := 1 to b do
begin
a[i] := random(100);
Write (a[i]:4);
end;
Writeln;
for i := 1 to b-1 do
for j := 1 to b-i do
if a[j] > a[j+1] then
begin
k := a[j];
a[j] := a[j+1];
a[j+1] := k;
end;
Write ('Otsortirovannii massiv: ');
for i := 1 to b do
begin
Write (a[i]:4);
end;
Writeln;
Readln;
end.