Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago