uses crt;
var
a:array [1..10] of integer;
s,p,i:integer;
begin
clrscr;
randomize;
for i:=1 to 10 do begin
a[i]:=random(601)-100;
write(a[i],' ');
end;
s:=0;
p:=1;
writeln;
if (a[i]>0) and (odd(i)=false) then s:=s+a[i];
if (a[i] mod 3 = 0) and (odd(i)=true) then p:=p*a[i];
writeln ('s = ',s);
writeln ('p = ',p);
readln;
end.
uses crt;
var
a:array [1..10] of integer;
s,p,i:integer;
begin
clrscr;
randomize;
for i:=1 to 10 do begin
a[i]:=random(601)-100;
write(a[i],' ');
end;
s:=0;
p:=1;
writeln;
for i:=1 to 10 do begin
if (a[i]>0) and (odd(i)=false) then s:=s+a[i];
if (a[i] mod 3 = 0) and (odd(i)=true) then p:=p*a[i];
end;
writeln ('s = ',s);
writeln ('p = ',p);
readln;
end.