program Average;
var
a: array [1..10, 1..10] of Real;
i, j: Integer;
s: Real;
begin
Randomize;
for i := 1 to 10 do begin
WriteLn;
for j := 1 to 10 do begin
a [i, j] := Random (100);
Write (a [i, j] :6 :2);
end;
s := 0;
s := s + a [i, j];
s := s / 100;
WriteLn ('Среднее = ', s :6 :2);
if a [i, j] < s then
a [i, j] := s;
ReadLn;
end.
program Average;
var
a: array [1..10, 1..10] of Real;
i, j: Integer;
s: Real;
begin
Randomize;
for i := 1 to 10 do begin
WriteLn;
for j := 1 to 10 do begin
a [i, j] := Random (100);
Write (a [i, j] :6 :2);
end;
end;
s := 0;
for i := 1 to 10 do begin
for j := 1 to 10 do begin
s := s + a [i, j];
end;
end;
s := s / 100;
WriteLn;
WriteLn ('Среднее = ', s :6 :2);
for i := 1 to 10 do begin
for j := 1 to 10 do begin
if a [i, j] < s then
a [i, j] := s;
end;
end;
for i := 1 to 10 do begin
WriteLn;
for j := 1 to 10 do begin
Write (a [i, j] :6 :2);
end;
end;
ReadLn;
end.