10 PRINT "MATRIX MULTIPLICATION "
20 PRINT
29 REM - ARRAYS A AND B SHOULD BE SET TO  DIMENSIONS OF MATRICES
30 DIM A(10,10), B(10,10)
40 PRINT "DIMENSION OF MATRIX 1 (R,C)";
50 INPUT R1,C1
60 PRINT "DIMENSION OF MATRIX 2 (R,C)";
70 INPUT R2,C2
79 REM - # OF COLUMNS IN MATRIX 1 MUST EQUAL # OF ROWS IN MATRIX 2
80 IF C1=R2 THEN 110
90 PRINT "CANNOT BE MULTIPLIED; OTHER DIMENSIONS NECESSARY"
100 GOTO 40
109 REM - ENTER MATRIX VALUES
110 PRINT "MATRIX 1:"
120 FOR J=1 TO R1
130 PRINT "ROW";J
140 FOR I=1 TO C1
150 PRINT "VALUE COLUMN";I;
160 INPUT A(J,I)
170 NEXT I
180 NEXT J
190 PRINT
200 PRINT "MATRIX 2:"
210 FOR J=1 TO R2
220 PRINT "ROW";J
230 FOR I=1 TO C2
240 PRINT "VALUE COLUMN";I;
250 INPUT B(J,I)
260 NEXT I
270 NEXT J
280 PRINT
289 REM - PERFORM MATRIX MULTIPLICATION, PRINT RESULTANT MATRIX
290 FOR I=1 TO R1
300 FOR J=1 TO C2
310 S=0
320 FOR K=1 TO C1
330 S=S+A(I,K)*B(K,J)
340 NEXT K
350 PRINT S;"  ";
360 NEXT J
369 REM - ADVANCE OUTPUT DEVICE TO PRINT NEXT ROW
370 PRINT
380 NEXT I
390 END
