Help: i dont know where to start.

Hi, anyone with advice or hints on converting from base 10 to binary AND from base 8 to base 2.
Last edited on
you can write a function for it. something like...
int n,rem;
do {
rem = n % 2;
add rem to a dynamic list;
n /= 2;
} while (n>0);

similarly for base 8
Try this link as it provides some methods of implementation which could be helpful

http://www.cut-the-knot.org/recurrence/conversion.shtml
Topic archived. No new replies allowed.