const
n = 15;
var
a:array[1..n] of integer;
i, Count, Summ:integer;
begin
randomize;
Count := 0;
Summ := 0;
for i := 1 to n do
a[i] := random(101) - 20;
write(a[i], ' ');
inc(Summ, a[i]);
if a[i] < 0 then
inc(count);
end;
writeln;
writeln('Summ = ', Summ);
writeln('Count = ', count);
readln;
end.
const
n = 15;
var
a:array[1..n] of integer;
i, Count, Summ:integer;
begin
randomize;
Count := 0;
Summ := 0;
for i := 1 to n do
begin
a[i] := random(101) - 20;
write(a[i], ' ');
inc(Summ, a[i]);
if a[i] < 0 then
inc(count);
end;
writeln;
writeln('Summ = ', Summ);
writeln('Count = ', count);
readln;
end.