image of READY prompt

Wang2200.org

Listing of file='11' on disk='vmedia/glbr_22.wvd.zip'

# Sector 32, program filename = '11'
0005 DIM A(10,11),V(10)
0010 PRINT "ENTER N"
   : INPUT N
0015 PRINT "ENTER MATRIX"
0020 FOR S=1 TO N
0025 INPUT A(S,1),A(S,2),A(S,3),A(S,4),A(S,5),A(S,6),A(S,7),A(S,8),
     A(S,9),A(S,10),A(S,11)
0030 NEXT S
0035 FOR S=1 TO N
0040 FOR T=S TO N
   : IF A(T,S)<>0 THEN 50
   : NEXT T
0045 PRINT "MATRIX SINGULAR"
   : GOTO 999
0050 GOSUB 500
0055 A(S,S)=1/A(S,S)
   : GOSUB 600
0060 FOR T=1 TO N
   : IF T=S THEN 70
0065 B=-A(T,S)
   : A(T,S)=0
   : GOSUB 700
0070 NEXT T
   : NEXT S
0100 FOR S=N TO 1 STEP -1
   : IF V(S)=S THEN 140
0110 FOR J=1 TO N
0120 B=A(J,S)
   : A(J,S)=A(J,V(S))
   : A(J,V(S))=B
0130 NEXT J
0140 NEXT S
   : GOTO 800
0500 FOR J=1 TO N
0510 B=A(S,J)
   : A(S,J)=A(T,J)
   : A(T,J)=B
0520 NEXT J
   : V(S)=T
   : RETURN
0600 FOR J=1 TO N
   : IF J=S THEN 620
0610 A(S,J)=A(S,S)*A(S,J)
0620 NEXT J
   : RETURN
0700 FOR J=1 TO N
0710 A(T,J)=A(T,J)+B*A(S,J)
0720 NEXT J
   : RETURN
0800 FOR I=1 TO N
   : PRINT
   : FOR J=1 TO N
   : PRINT A(I,J),
0810 NEXT J
   : PRINT
   : NEXT I
0999 END