If the problem statement remains same with a small modification that we should not print the extra space after the last digit(written in words) without use of any extra memory, then how would we solve this problem
Input - 5048
Output - “five zero four eight”
Variation of this problem
Hey @acharyadhwanan29 you can print the last digit in main function() and print the remaining digits by sending n/10 in print() function or you can use an if else statement in the print() function to check that if it is the last digit and don’t give a space in that case.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.