fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10.  
  11. public static Integer factorial(Integer number){
  12. Integer fact = new Integer(1);
  13.  
  14.  
  15. Integer i = new Integer(0);
  16.  
  17. for(i=2;i<=number;i++){
  18. fact *= i;
  19. }
  20.  
  21. return fact;
  22.  
  23.  
  24. }
  25. public static void main (String[] args) throws java.lang.Exception
  26. {
  27. // your code goes here
  28.  
  29. System.out.println(factorial(Integer.valueOf(100)));
  30. }
  31. }
Success #stdin #stdout 0.1s 32492KB
stdin
Standard input is empty
stdout
0