I am solving a problem in which a positive integer is given and i have to display it in words.
For example if a number is 2134
the output should be "two one three four"
.
If i use the modulus operator and use the recursion technique, i get the digits starting from the least significant digit i.e "four three one two"
I can also reverse the number and then use modulus operator but i am looking for a better method.
What can be a better approach of solving this problem?.What concept am i missing?