program AverageArray;
vararr: array[1..10] of Integer;i, sum: Integer;average: Real;
beginsum := 0;
Randomize;
for i := 1 to 10 dobeginarr[i] := Random(101); // генерация случайного числа от 0 до 100sum := sum + arr[i];Write(arr[i], ' ');end;
average := sum / 10;
Writeln;Writeln('Среднее арифметическое: ', average:0:3);
end.
program AverageArray;
var
arr: array[1..10] of Integer;
i, sum: Integer;
average: Real;
begin
sum := 0;
Randomize;
for i := 1 to 10 do
begin
arr[i] := Random(101); // генерация случайного числа от 0 до 100
sum := sum + arr[i];
Write(arr[i], ' ');
end;
average := sum / 10;
Writeln;
Writeln('Среднее арифметическое: ', average:0:3);
end.