C/C++ langauge odd and even numbers - Part3

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2021
  • we apply this defination in C Language:
    A number is odd if it has 1 as its rightmost bit in bitwise representation. It is even if it has 0 as its rightmost bit in bitwise representation. This can be found by using bitwise AND on the number and 1. If the output obtained is 0, then the number is even and if the output obtained is 1, then the number is odd.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น •