Var ma:array[1..m,1..n] of integer; ar:array[1..m] of integer; i,j:integer; begin for i:=1 to m do begin ar[i]:=1; for j:=1 to n do begin readln(ma[i][j]); ar[i]*=ma[i][j]; end; end; writeln('Matrix:'); for i:=1 to m do begin for j:=1 to n do write(ma[i][j]:4); writeln; end; writeln('Res:'); for i:=1 to m do writeln(i,':',ar[i]); end.
Const
n=3;
m=4;
Var
ma:array[1..m,1..n] of integer;
ar:array[1..m] of integer;
i,j:integer;
begin
for i:=1 to m do
begin
ar[i]:=1;
for j:=1 to n do
begin
readln(ma[i][j]);
ar[i]*=ma[i][j];
end;
end;
writeln('Matrix:');
for i:=1 to m do
begin
for j:=1 to n do
write(ma[i][j]:4);
writeln;
end;
writeln('Res:');
for i:=1 to m do
writeln(i,':',ar[i]);
end.