OK, so how many spaces are there, and how many stars?
Can you work out how to do a loop to each number, and NOT display a line feed between them?

These pattern programs are really easy to do. Have a go and see how far you get. Don't just give up cos it takes more than three lines of code and a spot of head scratching.