uses NumLibABC;
begin
var n := ReadInteger(' n =');
var M := MatrRandomReal(n, n, -9, 9);
M.Transform(p -> Round(p,1));
var Mx := new Matrix(M);
Mx.Println(5, 1);
var k := ReadInteger('k =');
if k > 1 then
var Mr := Mx;
for var i := 2 to k do
Mx := Mr * Mx
end;
Mx.Println(20,5)
end.
uses NumLibABC;
begin
var n := ReadInteger(' n =');
var M := MatrRandomReal(n, n, -9, 9);
M.Transform(p -> Round(p,1));
var Mx := new Matrix(M);
Mx.Println(5, 1);
var k := ReadInteger('k =');
if k > 1 then
begin
var Mr := Mx;
for var i := 2 to k do
Mx := Mr * Mx
end;
Mx.Println(20,5)
end.