Const n=10; m=12; var b:array[1..n,1..m] of integer; i,j,k:integer; begin k:=0; for i:=1 to n do for j:=1 to n do b[i,j]:=random(30)-10; for i:=1 to n do begin for j:=1 to n do write(b[i,j]:5); writeln; end; for i:=1 to n do for j:=1 to n do if b[i,j]=i+j then k:=k+1; write ('количество искомых элементов ',k); writeln; end.
var b:array[1..n,1..m] of integer;
i,j,k:integer;
begin
k:=0;
for i:=1 to n do
for j:=1 to n do b[i,j]:=random(30)-10;
for i:=1 to n do begin
for j:=1 to n do write(b[i,j]:5);
writeln;
end;
for i:=1 to n do
for j:=1 to n do
if b[i,j]=i+j then k:=k+1;
write ('количество искомых элементов ',k);
writeln;
end.