Программа формирует новый массив со смещением в лево
Program sector;
const
n=10;
var
a,b:array [1..n,1..n] of integer;
z:real;
i,j,k: byte;
begin
randomize;
for i:=1 to n do begin
for j:=1 to n do begin
a[i,j]:=random (40);
a[i,j]:=a[i,j]-20;
write(a[i,j]:4);
end;
writeln;
end;
z:=0;
for i:=1 to n do
for j:=1 to i do
z:=z+a[i,j];
z:=z/(n*n);
writeln('srednee = ',z);
for i:=1 to n do begin
k:=1;
for j:=1 to n do
if a[i,j] > z then begin
b[i,k]:=a[i,j];
write(b[i,k]:4);
k:=k+1;
end;
writeln;
end;
readln;
end.