const n=20; a=18; b=25; W=3;
var
v: array [1..n] of Integer;
i, s: Integer;
begin
Randomize;
for i:=1 to n do v[i]:=a+Random(b-a+1);
for i:=1 to n do Write(v[i]:W); WriteLn;
for i:=1 to n do s:=s+v[i]; WriteLn('Avg = ',s/n:0:1);
for i:=1 to n do if n*v[i]>s then Write(v[i]:W); WriteLn;
end.
const n=20; a=18; b=25; W=3;
var
v: array [1..n] of Integer;
i, s: Integer;
begin
Randomize;
for i:=1 to n do v[i]:=a+Random(b-a+1);
for i:=1 to n do Write(v[i]:W); WriteLn;
for i:=1 to n do s:=s+v[i]; WriteLn('Avg = ',s/n:0:1);
for i:=1 to n do if n*v[i]>s then Write(v[i]:W); WriteLn;
end.