Create an HTML table.

 The table body should have at least three rows of three columns.
 Each of these three columns should be labelled "X", "Y", and "Z". 
 An extra column should be added at either the extreme left or the extreme right of the table that has no heading, but is filled with sequential row numbers. 
 The rows of the "X", "Y", and "Z" columns should be filled with random or sequential integers having 4 digits or less. 
 The numbers should be aligned in the same fashion for all columns.


Dim As Integer ncols = 3, nrows = 4
Dim As Integer col, row
 
Print "<!DOCTYPE html>" & Chr(10) & "<html>"
Print "<head></head>" & Chr(10) & "<body>"
Print "<table border = 1 cellpadding = 10 cellspacing =0>"
 
For row = 0 To nrows
    If row = 0 Then
        Print "<tr><th></th>" ;
    Else
        Print "<tr><th>" & row & "</th>" ;
    End If
    For col = 1 To ncols
        If row = 0 Then
            Print "<th>" & Chr(87 + col) & "</th>" ;
        Else
            Print "<td align=""right"">" & Rnd(9999) & "</td>" ;
        End If
    Next col
    Print "</tr>"
Next row
 
Print "</table>"
Print "</body>" & Chr(10) & "</html>"
Sleep