RosettaCodeData/Task/Matrix-multiplication/BBC-BASIC/matrix-multiplication.basic

19 lines
406 B
Plaintext

DIM matrix1(3,1), matrix2(1,2), product(3,2)
matrix1() = 1, 2, \
\ 3, 4, \
\ 5, 6, \
\ 7, 8
matrix2() = 1, 2, 3, \
\ 4, 5, 6
product() = matrix1() . matrix2()
FOR row% = 0 TO DIM(product(),1)
FOR col% = 0 TO DIM(product(),2)
PRINT product(row%,col%),;
NEXT
PRINT
NEXT