Найти произведение положительных элементов по строкам матрицы. Sos
Answers & Comments
vladrus113
Var pol:array [1..1000000] of integer; n,i,j,x:int64; begin read(n); for i:=1 to n do begin pol[i]:=1; for j:=1 to n do begin read(x); pol[i]:=pol[i]*x; end; end; for i:=1 to n do begin write(pol[i],' '); end; end.
Answers & Comments
n,i,j,x:int64;
begin
read(n);
for i:=1 to n do begin
pol[i]:=1;
for j:=1 to n do begin
read(x);
pol[i]:=pol[i]*x;
end;
end;
for i:=1 to n do begin
write(pol[i],' ');
end;
end.