First commit

This commit is contained in:
2026-02-19 18:51:17 +02:00
commit 2d9b2318a9
16 changed files with 358 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
-- Negative n resulted in a stackoverflow (infinite recursion)
function fact(n)
if n == 0 then
return 1
elseif n < 0 then
return nil
else
return n * fact(n - 1)
end
end
print("enter a number:")
a = io.read("*n")
print(fact(a))

View File

@@ -0,0 +1 @@
print(arg[0])