// PascalABC.NET 3.3
const n=7;
begin
Writeln('Исходный массив:');
var a:=MatrRandomReal(n,n,-5,5); a.Println(6);
var m:=a.ElementsByRow.Min;
var imin:=a.ElementsWithIndexes.Where(k->k[0]=m).Select(k->k[1]).Single;
var jmin:=a.ElementsWithIndexes.Where(k->k[0]=m).Select(k->k[2]).Single;
writeln('min = a[',imin+1,',',jmin+1,'] =',m:6:2);
end.
Пример:
Исходный массив:
4.68 -4.11 2.18 2.34 -1.06 -0.69 1.67
4.58 3.27 1.39 4.55 0.32 0.65 -3.59
3.10 0.66 0.94 -4.27 -1.46 -3.82 -0.40
-4.90 -2.71 2.46 -1.43 -1.62 0.45 1.78
1.59 -1.07 1.60 -0.16 -1.57 -0.83 2.95
4.19 -3.16 -4.25 1.71 -4.27 1.04 -3.72
-4.16 -2.30 0.90 4.46 3.51 -4.66 2.87
min = a[4,1] = -4.90