Floyd's triangle   lists the natural numbers in a right triangle aligned to the left where

 the first row is   1     (unity)
 successive rows start towards the left with the next number followed by successive naturals listing one more number than the line above.


The first few lines of a Floyd triangle looks like this:

 1
 2  3
 4  5  6
 7  8  9 10
11 12 13 14 15



Task

 Write a program to generate and display here the first   n   lines of a Floyd triangle. 
(Use   n=5   and   n=14   rows).
 Ensure that when displayed in a mono-space font, the numbers line up in vertical columns as shown and that only one space separates numbers of the last row.


Imports System.Text
 
Module Module1
 
    Function MakeTriangle(rows As Integer) As String
        Dim maxValue As Integer = (rows * (rows + 1)) / 2
        Dim digit = 0
        Dim output As New StringBuilder
 
        For row = 1 To rows
            For column = 0 To row - 1
                Dim colMaxDigit = (maxValue - rows) + column + 1
                If column > 0 Then
                    output.Append(" ")
                End If
 
                digit = digit + 1
                output.Append(digit.ToString().PadLeft(colMaxDigit.ToString().Length))
            Next
 
            output.AppendLine()
        Next
 
        Return output.ToString()
    End Function
 
    Sub Main()
        Dim args = Environment.GetCommandLineArgs()
        Dim count As Integer
 
        If args.Length > 1 AndAlso Integer.TryParse(args(1), count) AndAlso count > 0 Then
            Console.WriteLine(MakeTriangle(count))
        Else
            Console.WriteLine(MakeTriangle(5))
            Console.WriteLine()
            Console.WriteLine(MakeTriangle(14))
        End If
    End Sub
 
End Module