You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indirectly the question asks us whether the given number of chocolates are even or odd. Always we will use the modulus operator and find it.
Lets try using bitwise operator if our value and 1 gives 0 then it is Yes otherwise No eg: n = 5 - 101, 1 - 001 --> bitwise & - 001 which gives 1, representing n as odd.