Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Check if a number is divisible by 5 or 6, both Use logical operators and output should be a boolean in JAVA Input Get one

Check if a number is divisible by 5 or 6, both Use logical operators and output should be a boolean in JAVA

Input

Get one a number from user .

Output:

Enter an integer: 25

Is 25 divisible by 5 and 6? false

Is 25 divisible by 5 or 6? true

Is 25 divisible by 5 or 6, but not both? true

Is 25 not divisible by both 5 and 6 true

Enter an integer: 30

Is 30 divisible by 5 and 6? True Is 30 divisible by 5 or 6? true

Is 30 divisible by 5 or 6, but not both? False Is 30 not divisible by both 5 and 6 false

Enter an integer: 32

Is 32 divisible by 5 and 6? False Is 32 divisible by 5 or 6? false

Is 32 divisible by 5 or 6, but not both? False Is 32 not divisible by both 5 and 6 true

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions