I edited the post with a code snippet. Basically you can find the relationship between the numbers for the current row number, current column position and the full length of the triangle.
Row 1 - print a * position 1 through position 7 (full length(7) - row#(1) +1)
Row 2 - print a * position 1 through position 6 (full length(7) - row#(2) +1)
.
.
Row 6 - print a * position 1 through position 2 (full length(7) - row#(6) +1)
Row 7 - print a * position 1 only (full length(7) - row#(7) + 1)