Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.10 KB | None | 0 0
  1. public static int factorial(int n)
  2. {
  3. if(n <= 1)
  4. return 1;
  5. else
  6. return n * factorial(n - 1);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement