Wrong answer in test cases

I don’t know what’s wrong in my code pls check it https://ide.codingblocks.com/s/579699

Your code is correct. The error lies in the printing of elements.
We need to print the elements in a space separated manner.
Add a space after every number and star and it’ll work fine :slight_smile:

Yaa now it works fine Thank you

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.