const
n = 5;
var
a: array[1..n] of integer;
i: integer;
sr: real;
begin
randomize;
sr := 0;
for i := 1 to n do
a[i] := random(101);
sr := sr + a[i];
end;
writeln(sr / n:8:2);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
const
n = 5;
var
a: array[1..n] of integer;
i: integer;
sr: real;
begin
randomize;
sr := 0;
for i := 1 to n do
begin
a[i] := random(101);
sr := sr + a[i];
end;
writeln(sr / n:8:2);
end.