• + 0 comments

    Java Code:

    public static void extraLongFactorials(int n) {
            BigInteger fact=BigInteger.ONE;
            
            for(int i=1; i<=n; i++){
                fact = fact.multiply(BigInteger.valueOf(i));
            } 
            System.out.println(fact);
        }