const N=5;
var a:array [1..N,1..N] of integer;
i,j,min:integer;
begin
randomize;
for i:=1 to N do
for j:=1 to N do
a[i,j]:=random(21)-10;
write(a[i,j]:4);
end;
writeln;
min:=a[1,1];
if a[i,j]<min then
min:=a[i,j];
if min<>a[1,1] then a[1,1]:=min;
end.
const N=5;
var a:array [1..N,1..N] of integer;
i,j,min:integer;
begin
randomize;
for i:=1 to N do
begin
for j:=1 to N do
begin
a[i,j]:=random(21)-10;
write(a[i,j]:4);
end;
writeln;
end;
writeln;
min:=a[1,1];
for i:=1 to N do
for j:=1 to N do
if a[i,j]<min then
min:=a[i,j];
if min<>a[1,1] then a[1,1]:=min;
for i:=1 to N do
begin
for j:=1 to N do
write(a[i,j]:4);
writeln;
end;
end.