Write a Java Program to input two integer variables M and L. Verify whether variable M is a factor of
variable L or not. If M is a factor of L, then print whether it is an even factor or an odd factor. If M is
not a factor of L, then just print "Not a factor".
Answers
Answered by
5
public class Abc{
public static void main(int M, int L) {
if(L%M==0){
if(M%2==0)
System.out.println("It is an even factor") ;
else
System.out.println("It is an odd factor") ;
}
else
System.out.print("Not a factor");
}
}
.
.
.
.
HOPE THIS HELPS YOU
.
.
.
.
PLEASE MARK AS BRAINLIEST AND FOLLOW ME TOO
Similar questions