The following programs present possible solutions to the exercises.
1. 10 FOR X = 20 TO 40 STEP 2
2. 10 LET Y = .01
3. 5 DIM A$(5)
4. 10 DIM G(9,4)
20 FOR P = 1 TO 9
30 FOR S = 1 TO 4
40 READ G(P,S)
50 NEXT S
60 NEXT P
70 PRINT "TOURNAMENT GOLF SCORES"
80 PRINT "ENTER PLAYER NUMBER (l-9)"
90 INPUT P
100 PRINT "ENTER GAME NUMBER (1-4)"
110 INPUT S
120 PRINT "PLAYER #";P;"SCORE FOR GAME
#";S;"IS";G(P,S)
130 DATA 69,72,70,75,73,72,74,70,71,75,69,73
140 DATA 70,74,72,71,69,68,70,72,75,77,73,70
150 DATA 68,66,70,72,70,73,71,69,76,71,74,72
999 END
RUN
TOURNAMENT GOLF SCORES
ENTER PLAYER NUMBER (1-9)
?6
ENTER GAME NUMBER (1-4)
?2
PLAYER #6 SCORE FOR GAME #2 IS 77
5. 10 DEF FNP(C) = C (.20*C)
6. 10 PRINT "ENTER MILES AND GALLONS"