var i, j, min, min_i, min_j: integer; a: array[1..5, 1..5] of integer;
begin for i := 1 to 5 do begin for j := 1 to 5 do begin a[i, j] := random(100) + 1; write(a[i, j]:4); end; writeln; end; min := 999; for i := 1 to 5 do for j := 1 to 5 do if min > a[i, j] then begin min := a[i, j]; min_i := i; min_j := j; end; a[min_i, min_j] := 0; writeln('Массив с замененным минимальным элементом'); for i := 1 to 5 do begin for j := 1 to 5 do write(a[i, j]:4); writeln; end; end.
var
i, j, min, min_i, min_j: integer;
a: array[1..5, 1..5] of integer;
begin
for i := 1 to 5 do
begin
for j := 1 to 5 do
begin
a[i, j] := random(100) + 1;
write(a[i, j]:4);
end;
writeln;
end;
min := 999;
for i := 1 to 5 do
for j := 1 to 5 do
if min > a[i, j] then
begin
min := a[i, j];
min_i := i;
min_j := j;
end;
a[min_i, min_j] := 0;
writeln('Массив с замененным минимальным элементом');
for i := 1 to 5 do
begin
for j := 1 to 5 do
write(a[i, j]:4);
writeln;
end;
end.