Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure main()
- local a,b
- a:=read()
- b:=factorial(a)
- write(b)
- end
- procedure factorial(n)
- local p,i
- p:=1
- every i:=1 to n do {
- p:=p*i
- }
- return p
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement