Write number N in basis M
- by VaioIsBorn
I know how to do it mathematically, but i want it now to do it in c++ using some easy algorithm. Is is possible ?
The question is that i need some methods/ideas for writing a number N in basis M, for ex. 14 in basis 3 = 2*(3^0) + 1*(3^1) + 1*(3^2) etc.