Fails in all the test cases of pattern with zero

i have coded the problem it run sucessful in Run code but fails all the test cases.please help me out.
here is the code https://ide.codingblocks.com/s/103984

@Ajitverma1503
Put a space after each integer output and your code works fine.

i have submit that code but still it show red

@Ajitverma1503
Please share your code again.
Also please confirm that you are trying your code for this problem only - https://hack.codingblocks.com/contests/c/537/163