Var
sr:real;
i,j,n:integer;
a:array[1..8,1..4]of integer;
b:array[1..32] of integer;
begin
for i:=1 to 8 do
begin
for j:=1 to 4 do
begin
a[i,j]:=random(-40,90);
write(a[i,j]:4);
sr:=sr+a[i,j];
end;
writeln;
end;
sr:=sr/32;
writeln('Среднее: ',sr);
for i:=1 to 8 do
for j:=1 to 4 do
if a[i,j]>sr then
begin
n:=n+1;
b[n]:=a[i,j];
end;
writeln('Количество искомых элементов: ',n);
for i:=1 to n do write(b[i]:4);
end.