diff --git a/NanoBASIC/Examples/fib.bas b/NanoBASIC/Examples/fib.bas index cba3b0a..df80467 100644 --- a/NanoBASIC/Examples/fib.bas +++ b/NanoBASIC/Examples/fib.bas @@ -1,13 +1,12 @@ REM Printing the Fibonacci numbers less than 100 -REM A is LAST -20 LET A = 0 -REM B is NEXT -30 LET B = 1 -31 PRINT A -REM C is LAST + NEXT -35 LET C = A + B -40 LET A = B -50 LET B = C -60 IF B > 100 THEN GOTO 80 -70 GOTO 31 -80 PRINT A +REM A is the last number +10 LET A = 0 +REM B is the next number +11 LET B = 1 +20 PRINT A +21 PRINT B +REM C is last + next +30 LET C = A + B +31 LET A = B +32 LET B = C +40 IF B < 100 THEN GOTO 21