Code giving wrong output

@naaz you have to store all the answer and print all by iterating on out

https://ide.codingblocks.com/s/307072 what is wrong with this code

@naaz
input n