Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- unsigned int z;
- int wyn=0;
- scanf("%u",&z);
- while (z!=0)
- {
- if ((z & 1) == 1)
- {
- wyn=wyn+1;
- }
- z >>= 1;
- }
- printf("%d", wyn);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement