Factorial.java 314B

123456789101112131415161718
  1. import java.math.BigInteger;
  2. public class Factorial {
  3. public BigInteger factorialOf(Integer value){
  4. BigInteger fact = BigInteger.valueOf(1);
  5. for (int i = 1; i <= value; i++)
  6. {
  7. fact = fact.multiply(BigInteger.valueOf(i));
  8. }
  9. return fact;
  10. }
  11. }