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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!