150 DIM K(28,8),V$(120),T$(4),U5(120),X(28)
160 V$="BLTMIAMN.E.NY.JBUFFCINCPITTHOUSCLEVOAK DENVS.D.STTLK.C.DALLPHILWASHS.L.NY.GMINNCHI DET G.B.T.B.L.A.ATL.S.F.N.O."
480 INPUT "Results are for which week of season? ",W1
600 'Name of program is NFLUPDAT 
640 OPEN "I",1,"B:NFLFYL"
650 FOR I=1 TO 28
660  	FOR J=1 TO 8
670	INPUT #1,K(I,J)
680     NEXT J
690 NEXT I
695 CLOSE 
697 PRINT"  TEAM   WON  LOST TIED PCT   PF  PA  PR"
700 FOR I=1 TO 28
702	IF I<>1 THEN U5=(I-1)*4 ELSE U5=1
705	PRINT I;" ";MID$(V$,U5,4);
707	Z3=10
710	FOR J=2 TO 8
720		PRINT TAB(Z3);K(I,J);
723		Z3=Z3+5
725	NEXT J
726 PRINT
727 NEXT I
731 INPUT "Do you need to edit any of the numbers? ",A$
732 IF LEFT$(A$,1)<>"Y" THEN 738
733 INPUT "Number of team wh;ose record needs correction. ",I
734 IF I<1 OR I>28 THEN PRINT"Between 1 and 28.":GOT 733
735 GOSUB 2500
736 INPUT "If another correction needed enter 'Yes",A$
737 IF LEFT$(A$,1)="Y" THEN 733:PRINT
738 PRINT ENTER THIS WEEK's results.":?:?
739 'Figures stats for the season so far
750 FOR I=1 TO 28
760	F1=0:A1=0
765	IF I<>1 THEN U5=(I-1)*4 ELSE U5=1
767	PRINT MID$(V$,U5,4):
770	INPUT "Score ",F1
772	INPUT "Opponent's score ",A1
775	INPUT "Opponent's power rating from last week ",O
776	PRINT MID$(V$,U5,4),"Score","Opp.score","Opp.power rating"
777	PRINT"",F1,A1,O
778	INPUT "If correct enter 'Y' else 'N' to correct ",B$
779	IF LEFT$(B$,1)<>"Y" THEN 767
780     H=0
790     H=K(I,8)-O
800     D=0
810	D=F1-A1
820	L=D-H
839	IF F1>A1 THEN K(I,2)=K(I,2)+1:GOTO 870
840	IF F1<A1 THEN K(I,3)=K(I,3)+1:GOTO 870
850     IF FI=A1 THEN K(I,4)=K(I,4)+1
860	K(I,5)=0
870	K(I,6)=K(I,6)+F1
880	K(I,7)=K(I,7)+A1
890	IF K(I,2)-K(I,3)=0 AND K(I,4)>0 THEN K(I,5)=.5:GOTO 1080
900	W2=K(I,2):L2=K(I,3):T2=K(I,4)   
910	K(I,5)=(INT(1000*((W2+T2/2)/W1)+.0005))/1000
920     IF L=0 THEN K(I,8)=K(I,8):GOTO 1080
930	IF L<0 THEN 1030
940	IF L<5 THEN K(I,8)=K(I,8):GOTO 1080
950	IF L<10 THEN K(I,8)=K(I,8)+1:GOTO 1080
960     IF L<15 THEN K(I,8)=K(I,8)+2:GOTO 1080
970	IF W1>8 AND L>19 THEN K(I,8)=K(I,8)+2:GOTO 1080
980	IF L<20 THEN K(I,8)=K(I,8)+3:GOTO 1080
990	IF W1>5 AND L>19 THEN K(I,8)=K(I,8)+3:GOTO 1080
1000	IF L>19 THEN K(I,8)=K(I,8)+4:GOTO 1080
1010	IF W1>8 AND L<-15 THEN K(I,8)=K(I,8)-2:GOTO 1080
1020	IF W1>5 AND L<-19 THEN K(I,8)+K(I,8)-3:GOTO 1080
1030	IF L<-19 THEN K(I,8)=K(I,8)-4:GOTO 1080
1040	IF L<-15 THEN K(I,8)=K(I,8)-3:GOTO 1080
1050	IF L<-10 THEN K(I,8)=K(I,8)-2:GOTO 1080
1060	IF L<-5 THEN K(I,8)=K(I,8)-1:GOTO 1080
1070	K(I,8)=K(I,8)
1075	PRINT"T W L T PCT PF PA PR"
1080	PRINT K(I,1);K(I,2);K(I,3);K(I,4);K(I,5);K(I,6);K(I,7);K(I,8)
1082	INPUT "Are the figures correct? ",A$
1083	IF LEFT$(A$,1)="Y" THEN 1090 ELSE GOSUB 2500
1090 NEXT I
1100 '
1110 STOP
1120 PRINT
1130 OPEN "O",1,"B:NFLFYL"
1140 FOR I=1 TO 28
1150	FOR J=1 TO 8
1160		WRITE #1,K(I,J)
1170 NEXT J:NEXT I
1180 CLOSE
1200  LPRINT "Team power rating to use  week ",W1+1
1210 PRINT
1220 FOR I=1 TO 28
1230    IF I<>1 THEN U5=(I-1)*4 ELSE U5=1
1240    LPRINT K(I,1);TAB(5);MID$(V$,U5,4);TAB 15;K(I,8)
1250 NEXT I
1330 S=S+.0001
1340 FOR I=1 TO 28
1350	S=S+.00001
1360	K(I,5)=K(I,5)+S
1370 NEXT I
1380 T1=0:T2=0
1390 PRINT"To print standings by conf. and division"
1400 PRINT"enter conf and division. To end;, enter 'None'."
1410 INPUT "Conference? ",C$
1420 INPUT "Division? ",D$
1425 IF C$="NONE" THEN 1840
1430 INPUT "Number of first and last team in division ",T1,T2
1440 FOR I=T1 TO T2
1450	FOR J=1 TO 8
1460	PRINT K(I,J);
1470 NEXT J:PRINT:NEXT I
1480 FOR I=T1 TO T2
1490	J=5
1500 NEXT I
1510 FOR I=T1 TO T2
1520	X=K(I,5)
1530	X(I)=X
1540 NEXT I
1550 PRINT
1570 FOR I=T1 TO T2-1
1590	FOR J=I+1 TO T2
1600		IF X(J)>=X(I) THEN 1650
1610		SWAP X(I),X(J)
1650 NEXT J:NEXT I
1670 PRINT
1680 PRINT
1700 LPRINT C$,D$
1710 LPRINT
1720 LPRINT"Team   W  L  T  PCT    PF  PA  PR"
1730 LPRINT
1740 FOR I=T2 TO T1 STEP-1
1750	FOR J=T1 TO T2
1760		IF X(I)=K(J,5) THEN T7=J
1770	NEXT J
1780	IF K(T7,1)<>1 THEN U5=(K(T7,1)-1)*4 ELSE U5=1
1790    LPRINT MID$(V$,U5,4);
1800	LPRINT TAB(6);K(T7,2);TAB(9);K(T7,3);TAB(13);K(T7,4);TAB(17); USING "#.###";K(T7,5);
1805	LPRINT TAB(23);K(T7,6);TAB(27);K(T7,7);TAB(31);K(T7,8)
1810 NEXT I
1830 GOTO 1380
1840 PRINT
1850 PRINT"This will print out a point-spread prediction for"
1860 PRINT"upcoming games."
1870 PRINT:PRINT"Enter numbers of teams as requested."
1880 PRINT"To end the program, enter '99' for the home team."
1890 PRINT:PRINT
1910 INPUT "Home team number? ",X2
1920 IF X2=99 THEN 2140
1930 INPUT "Visiting team number? ",Y2
1940 IF K(X2,1)<>1 THEN U5=(K(X2,1)-1)*4 ELSE U5=1
1950 IF K(Y2,1)<>1 THEN U6=(K(Y2,1)-1)*4 ELSE U6=1
1960 PRINT
1970 LPRINT"Home team and visitors power ratings:"
1980 LPRINT MID$(V$,U5,4);K(X2,8),MID$(V$,U6,4);K(Y2,8)
1990 PRINT
2000 D=K(X2,8)+4-K(Y2,8)
2010 IF D>0 THEN 2020 ELSE 2060
2020 LPRINT MID$(V$,U5,4);" is favored over ";MID$(V$,U6,4);" by ";D;" points."
2030 LPRINT
2050 GOTO 1910
2060 IF D=0 THEN LPRINT"Game is a toss-up between ";MID$(V$,U5,4);" and ";MID$(V$,U6,4):GOTO 1910
2070 LPRINT
2080 PRINT
2100 LPRINT MID$(V$,U6,4);" is favored over ";MID$(V$,U5,4);" by ";ABS(D);" points."
2110 LPRINT
2120 PRINT
2130 GOTO 1910
2150 END
2495 END
2500 X1=2
2510 IF X1=2 THEN B$="Wins"
2520 IF X1=3 THEN B$="Losses"
2530 IF X1=4 THEN B$="Ties"
2540 IF X1=5 THE X1=X1+1: GOTO 2510
2550 IF X1=7 THEN B$="Pnts agnast"
2551 IF X1=8 THEN RETURN
2553 IF I<>1 THE U5=(I-1)*4 ELSE U5=1
2557  PRINT MID$(V$,U5,4);"  ":B$;"=";K(I,X1)
2560 IPUT "Is the figure correct? ",A$
2570 IF LEFT$(A$,1)="Y" THEN X1=X1+1:GOTO 2510
2580 INPUT "Enter correct number",A
2590 K)I,X1)=A:X1=X1+1:GOTO 2510
? ",A$
2570 IF LEFT$(A$,1)