From 7b21727285e50b0b050c4ddd70d07542229c5366 Mon Sep 17 00:00:00 2001 From: pants Date: Mon, 21 Sep 2026 14:17:03 -0700 Subject: init --- lua/test.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lua/test.lua (limited to 'lua/test.lua') diff --git a/lua/test.lua b/lua/test.lua new file mode 100644 index 0000000..d1d43d7 --- /dev/null +++ b/lua/test.lua @@ -0,0 +1,11 @@ +function factorial (i) + if i == 0 then + return 1 + else + return i * factorial(i-1) + end +end + +print("number: ") +num = io.read("*number") +print(factorial(num)) -- cgit v1.2.3