Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Iteration
- f=(n,p=1)=>{ while(n) p*=n--; return p }
- //Recursion
- f=n=>!n||n*f(~-n)
- //Memory
- f=n=>[...Array(n)].reduce((s,e,i)=>-~i*s,1)
- main(int i, char **o) <% return o?printf("%d",main(atoi(1[o]),0)):i?i*main(~-i,o):1; %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement