Tuesday 2 April 2024

BASIC

10 INPUT "Enter number of terms: ", n
20 LET a = 0
30 LET b = 1
40 PRINT a;
50 FOR i = 2 TO n
60 PRINT ", "; b;
70 LET temp = b
80 LET b = a + b
90 LET a = temp
100 NEXT i

No comments:

Post a Comment