1234567891011121314151617181920 |
-
-
-
- import java.math.BigInteger;
-
- public class Factorial {
-
- public BigInteger factorialOf(Integer value){
- //BigInteger answer;
-
- BigInteger answer = new BigInteger("1");
- for(int i = 1; i<=value; i++){
- answer = answer.multiply(BigInteger.valueOf(i));
- }
-
- return answer;
- }
-
- }
|