//Pascal ABC.NET 3.1 сборка 1256
Const
n=6;
Var
ar:array[1..n] of integer;
i:integer;
begin
randomize;
writeln('Array:');
for i:=1 to n do
begin
ar[i]:=random(10);
write(ar[i]:4);
end;
for i:=1 to n div 4 do
swap(ar[i],ar[n div 2-i+1]);
for i:=n downto n-(n div 4) do
swap(ar[i],ar[(n div 2)+1+n-i]);
writeln;
writeln('Final array:');
for i:=1 to n do
write(ar[i]:4);
end.