I am not able to print pattern

My code https://ide.codingblocks.com/s/147963
hackerblock link for question https://hack.codingblocks.com/app/contests/987/p/165

@harshkumar.877587 hey harsh this problem is quite easy all you need to take two nested loop for int i =0 to <=n and j=1 to j<=i and take three variable int a=0,b=1,sum=0;
and calculate the sum inside the loop and print the a value which print the pattern