Before each row, meaning at the beginning of each row you need to print before the first '*' the spaces. How many spaces will depend on the row you are now. I believe it is the 'i' that counts the rows. So the 1st row will have 0 spaces, the 2nd row will have 1 space.
And I gave you code for printing spaces.