I'm just starting out at Java programming so my problem is likely obvious. The program needs to prompt the user to enter an integer and checks whether the number is divisible by 4, 5 and 6, or some combination of them, or just one of them. It then needs to tell the user what the number is and isn't divisible by. I think my problem is with a boolean but right now my program only tells the user if the number is divisible, not if it isn't.
import java.util.Scanner; public class Unit3PartOne { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer: "); int num1 = input.nextInt(); if (num1 % 4 == 0 && num1 % 5 == 0 && num1 % 6 == 0) System.out.println("Your number is divisible by 4, 5, and 6"); } }