Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public class Factorial
  2. {
  3. public static void main (String args [ ])
  4. {
  5.  
  6. System.out.println(factorial());
  7. int holder = in.nextInt();
  8. Scanner in = new Scanner(System.in);
  9. }
  10. }
  11.  
  12.  
  13. class mo dito
  14.  
  15. {
  16. public int factorial (int n)
  17. {
  18. if(n<=1) return 1;
  19.  
  20. else return n*factorial(n-1);
  21. }
  22.  
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement