Const n=4; Var x:array [1..n,1..n] of integer; s,i,j:integer; begin randomize; for i:=1 to n do begin for j:=1 to n do begin x[i,j] := random(100); write(x[i,j]:6); end; writeln; end; s:=0; for i:=1 to n do for j:= 1 to n do if i + j < n + 1 then s := s + x[i, j]; writeln('s=',s); readln; end.
Var x:array [1..n,1..n] of integer;
s,i,j:integer;
begin
randomize;
for i:=1 to n do begin
for j:=1 to n do begin
x[i,j] := random(100);
write(x[i,j]:6);
end;
writeln;
end;
s:=0;
for i:=1 to n do
for j:= 1 to n do
if i + j < n + 1
then
s := s + x[i, j];
writeln('s=',s);
readln;
end.