So, you've just started on a programming course, eh? How did I guess.
Break it down into simple steps. Start with a program that prints a line of stars.
Then change it so that it prints a line of n stars where you can specify the value of n (within the program).
// code that prints a line of n stars
Then can you think of a way to repeat that line over and over with n increasing from 1 to a maximum value? Hint: you'll probably have used the same statement in printing a line of n stars.