Jump to content

Module:Sandbox/sameboat: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Undid revision 545318538 by Sameboat (talk)
Replaced content with 'print("Hello World")'
Line 1: Line 1:
print("Hello World")
-- 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))

Revision as of 01:24, 19 March 2013

print("Hello World")