A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Fibonacci in Lua page! Here, you'll find the source code for this program as well as a description of how the program works.
function fib(n) local a, b = 0, 1 for k = 1, n do a, b = b, a + b print(k .. ": " .. a) end end if tonumber(arg) ~= nil then n = tonumber(arg) print(fib(n)) else print("Usage: please input the count of fibonacci numbers to output") end
Fibonacci in Lua was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.