Program swap;
const
N = 10;
var
a: array [1..N] of integer;
i, temp: integer;
begin
randomize;
writeln('исходный массив: ');
for i := 1 to N do
begin
a[i] := Random(10);
write(a[i], ' ');
end;
writeln;
i := 1;
while i <= 9 do<br> begin
temp := a[i];
a[i] := a[i+1];
a[i+1] := temp;
i := i + 2;
end;
writeln('полученный массив: ');
for i := 1 to N do
write(a[i], ' ');
end.