Can anyone help me whrite a recursive function that returnsthe number of 1\'s in
ID: 3613395 • Letter: C
Question
Can anyone help me whrite a recursive function that returnsthe number of 1's in the binary representation on N. use the factthat this is equal to the number of 1's in the presentation ofN/2, plus 1 if N is odd. i really need help with thisproblem: i was thinking that in away i have to use % 2, because theNumber(N) will be in decimal and in order to convert itto binary i must divided by two.can you help me please!!!!!! Can anyone help me whrite a recursive function that returnsthe number of 1's in the binary representation on N. use the factthat this is equal to the number of 1's in the presentation ofN/2, plus 1 if N is odd. i really need help with thisproblem: i was thinking that in away i have to use % 2, because theNumber(N) will be in decimal and in order to convert itto binary i must divided by two.
can you help me please!!!!!!