1 " "CLEAR :DIM A(98):WAIT 90:PRINT "  MATRIX MULTIPLICATION":PRINT "  Copr. 1982 Tandy Corp.":LOCK 
5 WAIT 0:CLS :PRINT "  New Lst Edt Mul End"
6 Z=ASC INKEY$ -16:IF Z>0AND Z<6THEN 10*Z
7 GOTO 6
10 INPUT "1st matrix width? ";A:IF A<1THEN 10
11 CURSOR 11:INPUT "height? ";B:IF B<1THEN 11
12 CLS :INPUT "2nd matrix width? ";C:IF C<1THEN 12
13 D=A*B:IF A*B+B*C>100PAUSE "TOO BIG":GOTO 5
14 G=A:H=B:E$="A":GOSUB 60:G=C:H=A:E$="B":GOSUB 60:GOTO 5
20 GOSUB 80:GOSUB 70:FOR I=1TO L:FOR J=1TO K:N=I*K-K+J+M:B$=E$+"("+STR$ I+","+STR$ J+") ="
21 PAUSE B$;A(N):GOSUB 90:IF P$="Y"LPRINT B$;A(N)
22 NEXT J:NEXT I:GOTO 5
30 CLS :GOSUB 70:INPUT "Row? ";I,"Column? ";J:GOTO 32
31 GOTO 5
32 IF I<1OR I>LOR J<1OR J>KTHEN 30
33 N=M+K*I-K+J:PRINT E$;"(";STR$ I;",";STR$ J;") =";A(N);:INPUT " New? ";A(N)
34 GOTO 30
40 GOSUB 80:FOR I=1TO B:FOR J=1TO C:L=0:FOR K=1TO A:L=L+A(A*I-A+K)*A(K*C-C+J+D):NEXT K
41 B$="C("+STR$ I+","+STR$ J+") =":PAUSE B$;L:GOSUB 90:IF P$="Y"LPRINT B$;L
42 NEXT J:NEXT I:GOTO 5
50 UNLOCK :END
60 F=(E$="B")*D:FOR I=1TO H:FOR J=1TO G:CLS :PRINT "Enter ";E$;"(";STR$ I;",";STR$ J;
61 INPUT "): ";A(F+I*G-G+J)
62 NEXT J:NEXT I:RETURN 
70 E$="":INPUT "Matrix? (A/B) ";E$:IF E$="A"LET K=A:L=B:M=0:RETURN 
71 IF E$="B"LET K=C:L=A:M=D:RETURN 
72 GOTO 70
80 P$="":INPUT "Hard copy? (Y/N) ";P$
81 RETURN 
90 IF INKEY$ <>""THEN 90
91 RETURN 
99 END
