Var
a: array [1..10] of integer;
pr, i, kol, sum: integer;begin
sum := 0;
pr := 1;
for i := 1 to 10 do
a[i] := -50 + random(100);
for i := 1 to 10 do
begin
if (a[i] mod 2 = 1) or (a[i] mod 2 = -1) then // 1
sum := sum + a[i];
if (i mod 2 = 0) then // 2
pr := pr * a[i]
else if (i mod 2 = 0) and (a[i] = 0) then
pr := 0;
end;
for i := 1 to 10 do
if (a[i] mod 10 = 0) then
a[i] := 0;
for i := 2 to 9 do // 3
begin
if a[i] = 0 then
if (a[i + 1] <> 0) and ((i + 1) mod 2 = 0) and (a[i - 1] <> 0) and ((i - 1) mod 2 = 0) then
kol := kol + 1;
end;
writeln('сумму нечетных элементов =', ' ', sum);
writeln('произведение элементов =', ' ', pr);
writeln('число пар соседних элементов =', ' ', kol);
end.