Division by 3 using itoa()

kens's Avatar, Join Date: Jul 2007
Light Poster
WAP to divide a number by 3 using itoa() and without using /,% and *.

Please help me with this problem.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
I could not understand your problem and as far as I know itoa() converts integer to character?
0
kens's Avatar, Join Date: Jul 2007
Light Poster
Can iota() be used to convert a number in base 10 to one in base 3 and then, if we could remove the last digit of the answer, that is 12 will be 110, remove last 0 ,making it 11.
Then, can we convert the result back to base 10 and display the answer?

Am I thinking in the right direction? If yes, is there an easy way to convert from base 3 back to base 10?