It’s full of stars!

A simple sounding task for today’s lesson.

Create a program that displays a triangle made of stars, it should be 5 stars in height. The output should look similar to the image at the side of the screen.

The trick to this task is not the loop, that is a fairly easy unconditional FOR loop.  The trick to this program is using a String variable and adding extra stars to the one variable this is done using & this is called concatenation.

The variable Star is blank at the start of the program. You then add a star to the end of it with each pass of the loop. This is outputted to a list box line by line. If you want more lines just change the length of the FOR loop.

How would you make the triangle appear the other way up?