Output wrong due to spacing

The output of the code is coming wrong after n=10 due to spacing . Please help.

please share your code after saving it on ide.codingblocks.com

Maam how to share the file as ide.codingblocks.com is not showing any link when I save the file.

Link of code written:

hey @karan_02
your code is correct.it passes all the test cases too

Maam but if we out n=15 the output is not as required due to spacing. So I was asking.
I have not submitted the code.

no the output is correct for 15 for the code you shared

Output for n=15 is this:

Just want to confirm if it is correct.

yes this is correct
you dont see the perfect shape here coz the number are double digits after 9 ,but it is correct

Ok . Thank you Maam.

1 Like