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”);
}
In questa pagina del sito puoi guardare il video online Trick | Check Even/Odd Number without using % (modulo operator) della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Codingflag 23 dicembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 778 volte e gli è piaciuto 19 spettatori. Buona visione!