const n=20;
var i,m,k:integer;
a:array[1..n] of integer;
begin
m:=-20;
for i:=1 to n do
a[i]:=random(16)-10;
write(a[i]:3,' ');
if a[i] > m then m:=a[i]
end;
writeln;
if (abs(a[i]) > m) then k:=k+1;
writeln(k)
end.
var i,s,k:integer;
a[i]:=random(21)-10;
if a[i] > 0 then
s:=s+ a[i];
k:=k+1
end
writeln(s/k:0:3)
const n=20;
var i,m,k:integer;
a:array[1..n] of integer;
begin
m:=-20;
for i:=1 to n do
begin
a[i]:=random(16)-10;
write(a[i]:3,' ');
if a[i] > m then m:=a[i]
end;
writeln;
for i:=1 to n do
if (abs(a[i]) > m) then k:=k+1;
writeln(k)
end.
const n=20;
var i,s,k:integer;
a:array[1..n] of integer;
begin
for i:=1 to n do
begin
a[i]:=random(21)-10;
write(a[i]:3,' ');
if a[i] > 0 then
begin
s:=s+ a[i];
k:=k+1
end
end;
writeln;
writeln(s/k:0:3)
end.