fork download
  1. class reverseFac {
  2. public static float reverse(float a,float b){
  3. if(b==2)
  4. System.out.print((int)a+" = ");
  5. float c=a/b;
  6. if(c<1){
  7. System.out.println("NONE");
  8. System.out.println();
  9. return 0;
  10. }
  11. else if(c==1){
  12. System.out.println((int)b+"!");
  13. return b;
  14. }
  15. else return reverse(c,++b);
  16. }
  17. public static void main(String[] args){
  18. reverse(3628800,2);
  19. reverse(479001600,2);
  20. reverse(6,2);
  21. reverse(18,2);
  22. }
  23. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
3628800 = 10!
479001600 = 12!
6 = 3!
18 = NONE