Quote:
I have tried using functions. Please do not use functions. Make program as simple as possible and please comment.
Why not? Functions are good.
You task is pretty trivial, just pick a number from the user and then print out its representation using different basis. If you're allowed then you could use the strtol (see
strtol - C++ Reference[
^]) (or, in a more C++ apporach a
stringstream[
^] object). On the other hand writing yourself such simple conversion function is not a daunting task.