Why wrong output

@raj.verma5454 for input 5608 this code is not giving any output at all

can you tell me where i am making mistake??

hi @raj.verma5454 it’d be better if you dry run the code for the given input yourself. Let me know if you are stuck.

I insert space at 0th index , I got right result. What if I don’t want to separate my output with space like. for 506 it gives j m j n j o k m k n k o l m l n l o , but I want jm,jn,jo,km,kn,ko,lm,ln,lo . Then how to achieve that?

hi @raj.verma5454 please share the modified code

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.