Паскаль. Вычислить произведение элементов Р[1..20] больших 0.
Answers & Comments
sweetymon
Program i13; var proisv,p,i:integer; a:array[1..20] of integer; begin readln(p); proisv:=1; for i:= 1 to p do if a[i]>0 then proisv:=proisv*a[i] writeln(proisv); end.
Answers & Comments
var
proisv,p,i:integer;
a:array[1..20] of integer;
begin
readln(p);
proisv:=1;
for i:= 1 to p do
if a[i]>0 then
proisv:=proisv*a[i]
writeln(proisv);
end.