Question: a java program to configure if a number is divisible by 11, 9, 6 based on the users input. The program will first ask the
The program will first ask the user if they would like to randomly generate a number or enter it. If the user picks the randomly generated number, the program will use Math.random() to randomly generate the digits and will display the 5-digit number to the user. If the user wants to enter the number, then the program will ask the user for a 5- digit number The program will then ask the user if they would like to see if the number is divisible by 11,9 or 6. Once the user has entered their choice, the program will output whether the number is divisible by the number the user chose, 11.9 or 6 or not divisible by that number. If it is, the program will display the number with a space after it and the text, "is divisible by 11/9/6". If it is not, then the computer displays the number with a space after it and the text, "is not divisible by 11/9/6". The program will also be able to handle incorrect integer input. If the user does not enter a number that is expected the program will state, "Incorrect input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
