RosettaCodeData/Task/Matrix-exponentiation-operator/Chapel/matrix-exponentiation-operator-2.chapel
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

11 lines
229 B
Text

var m:[1..3, 1..3] int;
m(1,1) = 1; m(1,2) = 2; m(1,3) = 0;
m(2,1) = 0; m(2,2) = 3; m(2,3) = 1;
m(3,1) = 1; m(3,2) = 0; m(3,3) = 0;
config param n = 10;
for i in 0..n do {
writeln("Order ", i);
writeln(m ** i, "\n");
}