Uses
CRT;
Var
i, kol, n, ind: integer;
pr: real;
a: array [1 .. 20] of integer;
begin
randomize;
readln(n);
kol := 0;
for i := 1 to n do
begin
a[i] := random(10) - 3;
write(a[i]:3);
if a[i] > 0 then
inc(kol);
end;
writeln;
writeln('Kol:=', kol);
pr := 1;
ind := 0;
for i := n downto 1 do
if a[i] <> 0 then
pr := pr * a[i]
else
begin
ind := i;
break;
end;
if (ind <> 0) and (ind <> n) then
write('Pr:=', pr)
else
write('Нет нулей.Или он последний');
readkey;
end.