Submitted Questions

  • 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"