Const
m = 10;
var
a,b: array[1..m] of integer;
c: array[1..m*2] of integer;
i, j, k: integer;
begin
write ('Первый массив: ');
for i := 1 to m do
begin
a[i] := random(100);
c[i]:=a[i];
write (a[i],'; ');
end;
writeln;
write ('Второй массив: ');
for i := 1 to m do
begin
b[i] := random(100);
c[i+m]:=b[i];
write (b[i],'; ');
end;
writeln;
for i := 1 to 2*m-1 do
for j := 1 to 2*m-i do
if c[j] > c[j+1] then
begin
k := c[j];
c[j] := c[j+1];
c[j+1] := k
end;
write ('Отсортированный третий массив: ');
for i := 1 to 2*m do
write (c[i],'; ');
end.