var
f: array[1..100] of integer;
i, n, s: integer;
begin
writeln('Введите количество чисел: ');
readln(n);
randomize;
for i := 1 to n do
f[i] := random(0, n);
write(f[i], ' ');
end;
s := 0;
s := s + f[i];
writeln('Сумма: ', s);
end.
var
f: array[1..100] of integer;
i, n, s: integer;
begin
writeln('Введите количество чисел: ');
readln(n);
randomize;
for i := 1 to n do
begin
f[i] := random(0, n);
write(f[i], ' ');
end;
s := 0;
for i := 1 to n do
begin
s := s + f[i];
end;
writeln('Сумма: ', s);
end.