Topic: Bit Manipulation Problem / Level: beginner

Problem: Write a program to count how many numbers from 1 to n have the same parity as a given number.

Run the code to see the output here...