Check if a number is divisible by another number using Loop

In Java, how to check if a number is divisible by another number using Loop? Iterate through number 1 to 40 If the number is divisible by 3 show an output "Divisible by 3 If number is divisible by 5 show an output "Divisible by 5" If number is divisible by 15, show an output "Divisible by 15:. At this time it should not show "Divisible by 3" or "Divisible by 5"

## Check if a number is divisible by another number using Loop

Iterate through number 1 to 40 If the number is divisible by 3 show an output "Divisible by 3 If number is divisible by 5 show an output "Divisible by 5" If number is divisible by 15, show an output "Divisible by 15:. At this time it should not show "Divisible by 3" or "Divisible by 5"

gary4212Profile Answers by gary4212 Questions by gary4212

Questions by gary4212

This Question is not yet answered!

## Answer Question

Click here to Login / Register your free account

## Related Answered Questions

## Related Open Questions