Var a: array [0..10] of integer;
i, m: integer;
begin
m := 1;
for i := 0 to 10 do
begin
a[i] := random(50) - 25;
writeln('[', i, '] => ', a[i]);
end;
for i := 0 to 10 do
if (a[i] mod 2 = 1) then m := m * a[i];
writeln(m);
end.
2)
var a: array [0..10] of integer;
i, m: integer;
begin
for i := 0 to 10 do
begin
a[i] := random(50) - 25;
writeln('[', i, '] => ', a[i]);
end;
for i := 0 to 10 do
if ((a[i] > a[m]) and (a[i] < 0)) then
m := i;
writeln('[', m, '] => ', a[m]);
end.
Можно и меньше циклов, это я для наглядности, чтобы всё не смешивалось =)