Program s1; var a: array [1..10] of integer; i,n,s,p,k1,k2: integer; begin write ('n-? '); readln(n); for i: =1 to n do begin write (i, '-й-? '); readln (a[i]); end; for i: =1 to n do write ('', a[i]); writeln; s: =0; p: =1; k1: =0; k2: =0; k3: =0; for i: =1 to n do begin {1} s: =s+a[i]; {2} if a[i]> 0 then p: =p*a[i]; {3} if a[i]< 0 then k1: =k1+1; {4} if a[i] mod 2=0 then k2: =k2+1; {5} if a[i] mod 2=1 then k3: =k3*i; end; writeln ('s=', s, ' p=', p, ' k1=', k1, ' k2=', k2, ) end. из этой вывести произведение нечетных чисел в k3
var
a:array [1..10] of integer; i,n,k3:integer;
begin
write ('n-?'); readln(N);
for i:=1 to n do
Begin
Write (i, '-й-?'); readln (a[i]);
end;
for i:=1 to n do write ('', a[i]);
writeln;
k3:=0;
for i:=1 to n do
begin
if a[i] mod 2=1 then k3:=k3*i;
end;
writeln (' k3=', k3);
end.