const n=5; m=6; var i,j,s,k:integer; a:array[1..n,1..m]of integer; begin for i:=1 to n do begin for j:=1 to m do begin a[i,j]:=random(-50,50); write(a[i,j]:5); if abs(a[i,j])<10 then begin s:=s+a[i,j]; k:=k+1; end; end; writeln; end; writeln('ответ: ',s/k ); end.
const
n=5;
m=6;
var
i,j,s,k:integer;
a:array[1..n,1..m]of integer;
begin
for i:=1 to n do
begin
for j:=1 to m do
begin
a[i,j]:=random(-50,50);
write(a[i,j]:5);
if abs(a[i,j])<10 then
begin
s:=s+a[i,j];
k:=k+1;
end;
end;
writeln;
end;
writeln('ответ: ',s/k );
end.