Skip to content

Commit

Permalink
chore: format lua code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 15, 2021
1 parent 9f9be3e commit 4bbf656
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions txt/sample.lua.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-- defines a factorial function
function fact (n)
if n == 0 then
return 1
else
return n * fact(n-1)
end
end
print("enter a number:")
a = io.read("*number") -- read a number
print(fact(a))
-- defines a factorial function
function fact (n)
if n == 0 then
return 1
else
return n * fact(n-1)
end
end

print("enter a number:")
a = io.read("*number") -- read a number
print(fact(a))

0 comments on commit 4bbf656

Please sign in to comment.