Var ar:array[1..10,1..10] of integer;
i,j:integer;
begin;
randomize;
writeln('First matrix:');
for i:=1 to 10 do
begin;
writeln;
for j:=1 to 10 do
begin;
ar[i,j]:=random(2,10);
write(ar[i,j]:4);
end;
end;
writeln;
writeln('Final array:');
for i:=1 to 10 do
begin;
writeln;
for j:=1 to 10 do
begin;
if ar[i,j]=i+j then ar[i,j]:=0;
write(ar[i,j]:4);
end;
end;
end.