Guest User

Untitled

a guest
Jun 12th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.23 KB | None | 0 0
  1. PRINT "This program calculates the fibonaci sequence to N Places"
  2. INPUT "Count: ", N
  3. A = 0
  4. B = 1
  5. C = 1
  6. PRINT A
  7. IF N < 2 THEN END
  8. PRINT B
  9. IF N < 3 THEN END
  10. FOR I = 3 TO N
  11.   PRINT C
  12.   A = B
  13.   B = C
  14.   C = A + B
  15. NEXT
  16.  
  17. END
Add Comment
Please, Sign In to add comment