Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lua recursion with function
--lua 5.3 print ("Hello, Nel! \n") n = 0 function preloop() local num = n while(n<5)do --if n <5 then next step will cause recursion. when n == 5, the current step will skip recursion print("Creating recursion on n == "..n) n=n+1 preloop() --call self again end print("n: "..n..", local num: "..num) end preloop()
run
|
edit
|
history
|
help
0
BasicTablePrinter
Roots without the math library in Lua
RSA KEY GENERATOR (LUA)
Monty Hall Problem Simulated
sh
Hello 2
Linear Regression Lua
Newton-Raphson method for the square root
quick sort
test3