2)
const
N=8;
M=10;
var p:array[1..N,1..M] of integer;
i,j:integer;
begin
for i:= 1 to N do
for j:=1 to M do
begin p[i,j]:=i*j; write(p[i,j],' ')
end;
end.
3)
const
N=4;
M=6;
var z:array[1..N,1..M] of integer;
i,j,sum,pr:integer;
begin
randomize;sum:=0;
pr:=1;
for i:= 1 to N do
for j:=1 to M do
begin z[i,j]:=random(100);
write(z[i,j],' ');
sum:=sum+z[i,j];
pr:=pr*z[i,j];
end;
writeln();
write('сумма ',sum,' произведение ',pr);
end.
4)
const
N=5;
M=5;
var a:array[1..N,1..M] of integer;
i,j,sum,pr:integer;
begin
randomize;
sum:=0;
pr:=1;
for i:= 1 to N do
for j:=1 to M do
begin
a[i,j]:=random(100);
write(a[i,j],' ');
sum:=sum+a[i,j];
pr:=pr*a[i,j];
end;
writeln();
write('сумма ',sum,' произведение ',pr);
end.