An easy way to go from decimal to binary.
Psuedo Code
Quote:
While number>0
push a bit equal to (number mod 2) onto the end of the binary number
divide (number-(number mod 2)) by 2
end while
|
that should get you started, as a couple of hints, if all you are doing is printing out the number you may not need the array, also c truncates numbers when you do integer math, this simplifies the loop slightly.
See what you can figure out and feel free to ask for help