// PascalABC.NET 3.2, сборка 1447 от 22.05.2017
// Внимание! Если программа не работает, обновите версию!
begin
var f:real->real:=
x->cos(0.75*Power(x,0.25)-0.5*Power(x,0.5)+0.25*Power(x,0.75));
var a:=MatrGen(10,10,(i,j)->f(5+(10*i+j)*0.75));
Writeln('*** Исходный массив ***'); a.Println(7,3); Writeln(70*'-');
Writeln('*** Результирующий массив ***');
SetLength(a,11,10);
a.SetRow(10,a.Cols.Select(x->x.Min).ToArray); a.Println(7,3);
WriteAllLines('output.txt',a.Rows.Select(x->x.Select(y->Format('{0,7:F3}',y))
.JoinIntoString('')).ToArray);
end.
Результат
*** Исходный массив ***
0.668 0.629 0.589 0.550 0.509 0.469 0.428 0.387 0.346 0.305
0.263 0.222 0.180 0.139 0.098 0.057 0.016 -0.024 -0.064 -0.104
-0.143 -0.182 -0.220 -0.258 -0.295 -0.331 -0.367 -0.402 -0.437 -0.470
-0.503 -0.535 -0.566 -0.596 -0.625 -0.653 -0.680 -0.706 -0.732 -0.756
-0.779 -0.801 -0.822 -0.841 -0.860 -0.878 -0.894 -0.909 -0.923 -0.936
-0.948 -0.958 -0.968 -0.976 -0.983 -0.988 -0.993 -0.996 -0.999 -1.000
-1.000 -0.999 -0.996 -0.993 -0.988 -0.983 -0.976 -0.968 -0.959 -0.949
-0.939 -0.927 -0.914 -0.900 -0.885 -0.869 -0.853 -0.835 -0.817 -0.798
-0.778 -0.757 -0.735 -0.713 -0.690 -0.667 -0.642 -0.617 -0.592 -0.566
-0.539 -0.512 -0.485 -0.457 -0.429 -0.400 -0.371 -0.341 -0.312 -0.282
----------------------------------------------------------------------
*** Результирующий массив ***
0.668 0.629 0.589 0.550 0.509 0.469 0.428 0.387 0.346 0.305
0.263 0.222 0.180 0.139 0.098 0.057 0.016 -0.024 -0.064 -0.104
-0.143 -0.182 -0.220 -0.258 -0.295 -0.331 -0.367 -0.402 -0.437 -0.470
-0.503 -0.535 -0.566 -0.596 -0.625 -0.653 -0.680 -0.706 -0.732 -0.756
-0.779 -0.801 -0.822 -0.841 -0.860 -0.878 -0.894 -0.909 -0.923 -0.936
-0.948 -0.958 -0.968 -0.976 -0.983 -0.988 -0.993 -0.996 -0.999 -1.000
-1.000 -0.999 -0.996 -0.993 -0.988 -0.983 -0.976 -0.968 -0.959 -0.949
-0.939 -0.927 -0.914 -0.900 -0.885 -0.869 -0.853 -0.835 -0.817 -0.798
-0.778 -0.757 -0.735 -0.713 -0.690 -0.667 -0.642 -0.617 -0.592 -0.566
-0.539 -0.512 -0.485 -0.457 -0.429 -0.400 -0.371 -0.341 -0.312 -0.282
-1.000 -0.999 -0.996 -0.993 -0.988 -0.988 -0.993 -0.996 -0.999 -1.000