12345678910111213141516171819 |
-
-
-
- import java.math.BigInteger;
-
- public class Factorial {
-
- public BigInteger factorialOf(Integer value){
- long factorial = 1;
-
- for(long factor = 2; factor <= value; factor ++) {
- factorial *= factor;
- }
-
- return BigInteger.valueOf(factorial);
- }
-
- }
|