Some BASIC I can now run

10 REM Fibonacci Series
20 LET X = 0
30 LET Y = 1
40 LET COUNT = 0
45 IF COUNT < 1 THEN PRINT "HELLO THERE"
50 DIM Z(40)
60 GOSUB 100
62 FOR I = 0 TO 39
64 PRINT "Fibonacci number ", I, " is ", Z(I)
66 NEXT I
70 END
100 IF (COUNT > 39) THEN RETURN
110 LET Z(COUNT) = X + Y
120 LET X = Y
130 LET Y = Z(COUNT)
140 LET COUNT = COUNT + 1
150 GOSUB 100
160 RETURN
About these ads