Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. function fact(n)
  2. {
  3. if (n <= 1) // This is the base case
  4. return 1;
  5. else
  6. return n*fact(n-1);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement