I am creating a Number Generator program and it needs to look similar to this:
1
2 2
3 3 3
4 4 4 4
The user inputs the number of rows. I have no idea how to space out my numbers in order for that to look like a piramid. The code I have so far is:
Private Sub cmdShowTable_Cl ick()
Dim a As String
Dim num As Integer
Me.Cls
num = txtInput.Text
For i = 1 To num
a = ""
For j = 1 To i
a = a & " " & i
Next j
Print a
Next i
End Sub
Please Help!
1
2 2
3 3 3
4 4 4 4
The user inputs the number of rows. I have no idea how to space out my numbers in order for that to look like a piramid. The code I have so far is:
Private Sub cmdShowTable_Cl ick()
Dim a As String
Dim num As Integer
Me.Cls
num = txtInput.Text
For i = 1 To num
a = ""
For j = 1 To i
a = a & " " & i
Next j
Print a
Next i
End Sub
Please Help!
Comment