Thread: [c]Pointers
View Single Post
Old 12-18-2006, 06:50 AM   #2 (permalink)
Rekna
Junkie
 
You are converting from binary to binary? That doesn't make much sense. If you are going from binary to decimal that is pretty easy. Just loop over the digits and add 1 to a counter if the digit is a 1. When the loop moves to the next digit multiply by 2.

Are you doing all these problems for a class?
Rekna is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37