Write a java program that read 2 integers numbers, Then determines and prints if the first is a multiple(double) of the second

NOTE : Using if and else statements - and use the modulus ( the percentage mark ) to answer the question

this is my answer !!

pllz if any one found any mistake just tell me

package project1;
 
import javax.swing.JOptionPane;

public class Class1 {

public static void main (String args[] ){
    
    int num1,num2;
    
    num1=Integer.paresInt(JOptionPane.ShowMessageDialog("is number1 double num2?"));
    num2=Integer.paresInt(JOptionPane.ShowMessageDialog("is number2 double num1?"));

//What can i write inside the IF brackets bellow ??
if(num1%){
    
}
System.out.println(YES);

else

System.out.println(NO);


}

}

and thanq

btw im so bad in English
Please do not focus too much :s :p
hehehehehe

The % returns the modulo (reminder) of first number divided by second number so

5 % 2 is 1
and 6 % 3 is 0

so if(num1 % num2 == 0) it means that num1 is an excat multiple od num2

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.