Private Sub CreatePyramid(rows As Integer)
Dim empty As String = ""
For i = 1 To rows
Console.WriteLine(empty.PadRight(rows - i, " ") + createreeks(i))
Next
End Sub
Public Function CreateReeks(count As Integer)
Dim output As String = ""
If count = 1 Then
Return "1"
End If
For i = 2 To count
output += i.ToString()
Next
Return ReverseString(output) + "1" + output
End Function
Public Function ReverseString(ByRef strToReverse As String) As String
Dim result As String = ""
For i As Integer = 0 To strToReverse.Length - 1
result += strToReverse(strToReverse.Length - 1 - i)
Next
Return result
End Function