Question: Write a program Divide3Or5 that allows the user to enter a number. If the number is divisible by 3 and 5, print is a multiple

Write a program Divide3Or5 that allows the user to enter a number. If the number is divisible by 3 and 5, print is a multiple of 3 & 5. If the number is divisible by 3 and not by 5, print is a multiple of 3. If the number is divisible by 5 and not by 3, print is a multiple of 5. else print is not divisible by 3 or 5.

Sample output 1:

Please enter an integer 10

10 is a multiple of 5.

Sample output 2:

Please enter an integer

-15

-15 is a multiple of 3 & 5.

Sample output 3:

Please enter an integer

12

12 is a multiple of 3.

Sample output 4:

Please enter an integer

0

0 is not divisible by 3 or 5.

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!