Https://ide.codingblocks.com/s/461127

What’s wrong in the code and what should I change for the correct output

hello @nitinchoudhary260

u are asked to get the set bit counts of all the numbers that are in range [a…b]
so u need to run a loop from i= a to b.
and then count how many set bits are there in that particular number and add it to final answer .
and then at the end simply print it

Thanks for the explanation

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.