Question: Intro to Java Question: Write a program that prompts the user to enter an integer and checks whether the number is divisible by both 5
Intro to Java Question:
Write a program that prompts the user to enter an integer and checks whether the number is divisible by both 5 and 6 or neither of them, or just one of them. Here are some sample runs for inputs
10, 30, 23 . 10 is divisible by 5 or 6, but not both 30 is divisible by both 5 and 6 23 is not divisible by either 5 or 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
