Var a:array[1..10] of integer; i:integer; begin randomize; writeln('Ishodnyy massiv:'); for i:=1 to 10 do begin a[i]:=random(10)+1; write(a[i],' '); end; for i:=1 to 5 do begin a[i*2]:=a[i*2]+a[i*2-1]; a[i*2-1]:=a[i*2]-a[i*2-1]; a[i*2]:=a[i*2]-a[i*2-1]; end; writeln('Novyy massiv:'); for i:=1 to 10 do write(a[i],' '); end.