Count set bits of X
while ( X != 0 ) { X = ( X - 1 ) & X ; count ++ ; } if ( count % 2 == 0 ) { Console . Write ( even + " ▁ " + odd + " STRNEWLINE " ) ; } else { Console . Write ( odd + " ▁ " + even + " STRNEWLINE " ) ; } } }