Program n_1;
var b:array[1..8] of integer;
i, n, p, f:integer;
begin
p:=1;
f:=1;
writeln('Введите кол-во элементов');
readln(n);
for i:=1 to n do
begin
b[i]:=random(10)+1;
write(b[i],' ');
If i mod 2=0 then p:=p*b[i];
If i mod 2<>0 then f:=f*b[i];
end;
writeln('p=',p);
writeln('f=',f);
end.