projects
/
mirror_edk2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
AppPkg: Add the Lua interpreter and library.
[mirror_edk2.git]
/
AppPkg
/
Applications
/
Lua
/
scripts
/
Fact.lua
1
-- defines a factorial function
2
function fact (n)
3
if n == 0 then
4
return 1
5
else
6
return n * fact(n-1)
7
end
8
end
9
10
print("enter a number:")
11
a = io.read("*number") -- read a number
12
print(fact(a))