RosettaCodeData/Task/Matrix-multiplication/SPAD/matrix-multiplication.spad

27 lines
632 B
Plaintext

(1) -> A:=matrix [[1,2],[3,4],[5,6],[7,8]]
+1 2+
| |
|3 4|
(1) | |
|5 6|
| |
+7 8+
Type: Matrix(Integer)
(2) -> B:=matrix [[1,2,3],[4,5,6]]
+1 2 3+
(2) | |
+4 5 6+
Type: Matrix(Integer)
(3) -> A*B
+9 12 15+
| |
|19 26 33|
(3) | |
|29 40 51|
| |
+39 54 69+
Type: Matrix(Integer)