I'm stuck with a problem and can't work it out.
I'm needing a visual basic . net program written.
What I've worked out is...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim linecount As Integer
Dim asteriskcount As Integer
Dim asterisk As String
Dim spacecount As Integer
For spacecount = linecount To 20 - 1
Next
asteriskcount = 20 - spacecount To linecount - 1
Next
ListBox1.Items.Add(spacecount)
But I'm not sure where to go from here...
Please help
Write a program to enter a number between 1 to 20 and it displays a triangle of starts (asterisks) similar to the sample. Note the number of blank spaces decrease each line.
Use a fixed-width font “Courier” so that the spaces and asterisks will have the same width. If player does not enter a number, it will require a numeric value. But if the number is not in the range from 1 to 20, it will also require entering another number.
*
**
***
****
*****
******
*******
Sorry my asterisks dont line up but you get an idea