Program Task;
Var a: Array [1..10] of Integer;
i, tmp: Integer;
Begin
Randomize;
WriteLn('Сформированный массив:');
For i := 1 To 10 Do
Begin
a[i] := Random(10);
Write(a[i], ' ');
End;
WriteLn;
For i := 1 To 5 Do
Begin
tmp := a[i * 2];
a[i * 2] := a[i * 2 - 1];
a[i * 2 - 1] := tmp;
End;
WriteLn('Измененный массив:');
For i := 1 To 10 Do
Write(a[i], ' ');
ReadLn;
End.