SyntaxFix
Write A Post
Hire A Developer
Questions
How about this. using the modulo operator
if(a%b==0) { System.out.println("b is a factor of a. i.e. the result of a/b is going to be an integer"); } else { System.out.println("b is NOT a factor of a"); }