const
n = 30;
var
a: array [1..n] of integer;
s, i: integer;
begin
for i := 1 to n do
a[i] := random(151) + 50;
writeln('Дом ', i, ' = ', a[i]);
end;
s := s + a[i];
writeln('Всего ', s);
end.
const
n = 30;
var
a: array [1..n] of integer;
s, i: integer;
begin
for i := 1 to n do
begin
a[i] := random(151) + 50;
writeln('Дом ', i, ' = ', a[i]);
end;
for i := 1 to n do
s := s + a[i];
writeln('Всего ', s);
end.