Uses crt;
const
n=5;m=7;
var
S,i,j:integer;
P:real;
a:array[1..n,1..m]of integer;
begin
clrscr;
p:=1;S:=0;
for i:=1 to n do
begin
writeln;
for j:=1 to m do
begin
a[i,j]:=random(50);
write(a[i,j]:4);
s:=s+a[i,j];p:=p*a[i,j];
end;
end;
writeln;
writeln('S= ',s,' p= ',p:4:0);
readkey;
end.