Question: JAVA- Create a class named SmallestBigInteger that will find the smallest integer with a given number of digits(user input) that is divisible by another given
JAVA- Create a class named SmallestBigInteger that will find the smallest integer with a given number of digits(user input) that is divisible by another given integer (user input). MUST use StringBuilder class instead of String in this program. Create a static method with the method header: public static BigInteger findSmallest(int places,int factor ). places is the number of digits in the big number & factor, is the factor that divides the number. The method will return the answer in BigInteger type In the main method ask the user to enter places and factor and then get the value from the method.
Sample Example:
Enter the number of decimal places in the big number: 10
Enter the factor (less than 1,000,000): 34444
The smallest integer with 10 decimal places that is divisible by 34444 is: 1000012652
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
