Back to Library
QID: #32496
Solution for QID #32496: Can you add comments to each line of this program? import | StudyHelpMe
Can you add comments to each line of this program?
import java.util.Scanner;
import java.math.BigInteger;
public class MyClass {
public static BigInteger factorial(int number) {
if (number <= 1)
return BigInteger.ONE;
else
return factorial(number - 1).multiply(BigInteger.valueOf(number));
}
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
BigInteger number = in .nextBigInteger();
System.out.println("Factorial of " + number + " is: " + (factorial(number.intValue())));
}
}
ZERO AI
Human Written
Human Written
PHD EXPERTS
Verified
Verified
TURNITIN
Clean Report
Clean Report
FAST DELIVERY
Instant/Hourly
Instant/Hourly