1)
Const
n=10;
var
a:array[1..n]of integer;
i,s:integer;
begin
for i:=1 to n do
begin
a[i]:=random(41)-20;
write(a[i]:4);
if a[i]<0 then<br> s:=s+a[i];
end;
writeln;
writeln(' S= ',s);
end.
2)
Const
n=20;
var
i,s:integer;
a:array[1..n]of integer;
begin
for i:=1 to n do
begin
a[i]:=random(11)+15;
write(a[i]:4);
if a[i]mod 2=0 then
s:=s+a[i];
end;
writeln;
writeln('S = ',s);
end.