1.

> Accept a numbers and check whether the number is divisible by both 2 and 3 or not, withoutusing the && operator.Write a Java Program...pls...its urgent...​

Answer»

Answer:

Import java.util.*;

PUBLIC CLASS check

{

int;

SCANNER sc=new scanner (system. in);

S.o.pln("Enter a number") ;

a=sc.next Int();

If(a%2,3==0)

{

S.o.pln("It is divisible by 2,3");

}

else

S.o.pln("It is not divisible by 2,3")

}

}

}



Discussion

No Comment Found