Uses crt; const n=4; m=7; var a:array[1..n,1..m] of integer; i,j,s: integer; begin randomize; s:=0; for i:=1 to n do for j:=1 to m do begin a[i,j]:=random(101)-50; write(a[i,j]:4); end; writeln; for i:=1 to n do for j:=1 to m do if (a[i,j]>0) then s:=s+a[i,j]; writeln(s); end.
const n=4; m=7;
var a:array[1..n,1..m] of integer;
i,j,s: integer;
begin
randomize;
s:=0;
for i:=1 to n do
for j:=1 to m do
begin
a[i,j]:=random(101)-50;
write(a[i,j]:4);
end;
writeln;
for i:=1 to n do
for j:=1 to m do
if (a[i,j]>0) then s:=s+a[i,j];
writeln(s);
end.