Advertisement
dlard707

Fibonnaci Lua

Mar 2nd, 2023
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. function fibonacci(n)
  2. if n == 0 then
  3. return 0
  4. elseif n == 1 then
  5. return 1
  6. else
  7. return fibonacci(n-1) + fibonacci(n-2)
  8. end
  9. end
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement