Hello everyone, in this video we will see how you can easily check whether number is even or odd without using modulo operator. Modulo operator is very heavy operator. Instead of this we can use & operator.
if(n & 1 == 0){
print(“even”);
} else {
print(“odd”);
}