Q:

Need a programs that asks user to enter 2 integers, check to see if 2nd number is multiple of first number

I cannot figure out why my if-else statements are not working properly. This is what I have so far:
import java.util.Scanner;
public class multiple {
   public static void main (String[] args){
        Scanner input = new Scanner (System.in);
        int x = 4;
        int y = 3;
        int multiple = y % x;
        while (multiple != 0){
            System.out.println("Enter two integers: ");
            x = input.nextInt();
            y = input.nextInt();
            if (multiple != 0)
                System.out.println("Oops, sorry! The second integer is NOT a multiple of the first integer.");
            else
                System.out.println("Good Job! " + y + " is a multiple of " + x + "!");
        }       
    }
}

A:

You must update your multiple variable every time you change x and y. What you have now checks if 4%3 is 0, every single time.
In other words, set multiple to y%x after you update x and y.

