原題:
Write the function int bitCount(short input) that takes a short as input and
returns an int. The function returns the number of bits set in the input
variable. For instance:
bitCount(7) --> 3
bitCount(2543) --> 9
bitCount(11111) --> 9
Write the function int bitCount(short input) that takes a short as input and
returns an int. The function returns the number of bits set in the input
variable. For instance:
bitCount(7) --> 3
bitCount(2543) --> 9
bitCount(11111) --> 9