- 1

How can I solve this problem?

write a function with input and output that takes a decimal number and returns the summation of its bits

6th Sep 2018, 2:32 AM
Retag Tarek
Retag Tarek - avatar
5 Respostas
+ 2
so 5 which is 101 sums as 2 right?
6th Sep 2018, 9:04 PM
John Wells
John Wells - avatar
+ 2
so 9 which is 1001 is 5?
6th Sep 2018, 9:27 PM
John Wells
John Wells - avatar
+ 2
so 16 is 5.
6th Sep 2018, 9:33 PM
John Wells
John Wells - avatar
0
John Wells nup, 3 and I can't get the problems' idea
6th Sep 2018, 9:19 PM
Retag Tarek
Retag Tarek - avatar
6th Sep 2018, 9:28 PM
Retag Tarek
Retag Tarek - avatar