It is showing wrong answer

what am i doing wrong here?

hi @akshitabansal321 corrected

please explain the question … i don’t get your point

u need to print the output with output no, u cant use n for that right? use another variable to print that
eg :
3
3 2 1

try this with n and k++ u will see the diff

ooh…it’s output no. Now i get it. Thanks!