Question: can anyone Modify then Explain the below code? import java.util.Scanner; import java.math. * ; public class LargeFactorial { public static void main ( String [
can anyone Modify then Explain the below code?
import java.util.Scanner;
import java.math.;
public class LargeFactorial
public static void mainString args
Scanner input new ScannerSystemin;
System.out.printEnter an integer: ;
int n input.nextInt;
System.out.printlnn is
factorialn;
public static BigInteger factoriallong n
BigInteger result BigInteger.ONE; Assign to result
for int i ; i n; i Multiply each i
result result.multiplynew BigIntegeri;
return result;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
