#1
var
mas : array [1..10] of integer;
sum : integer := 0;
begin
for var i:=1 to 10 do begin
mas[i] := random(-5,5);
if (mas[i] <> 0) then
sum += mas[i];
end;
writeln(sum);
end.
#2
var
mas : array [1..10] of integer;
sum : integer := 1;
begin
for var i:=1 to 10 do begin
mas[i] := random(-2,2);
if (mas[i] <> 0) then
sum *= mas[i];
end;
writeln(sum);
end.
#3
var
mas : array [1..20] of integer;
sum : integer := 0;
sum1 : integer := 0;
begin
for var i:=1 to 20 do begin
mas[i] := random(100,1000);
if (i < 11) then sum += mas[i];
if (i >= 11) then sum1 += mas[i];
end;
writeln(sum + ' ' + sum1);
end.