[algogeeks] Represent a number in base of minus 2 ????

2012-01-29 Thread Zyro
Write a function that takes an integer and returns a char array that contains the -2 (minus 2) base representation of the given integer. Example: Input Output 7 11011 3 111 2 110 Plzzz help ??? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] Represent a number in base of minus 2 ????

2012-01-29 Thread Anika Jain
I didnt get the idea of minus 2, coz wen base is 2, we use digits 0 and 1, if its base , then digits from 0 to 7 and so on.. so for base -2, which digits go? On Sun, Jan 29, 2012 at 11:26 PM, Zyro vivkum...@gmail.com wrote: Write a function that takes an integer and returns a char array that