Imports System
Public Class exercise102
Public Shared Sub WriteUnder(ByVal text As String)
Dim countSpaces As Integer = (80 - text.Length) / 2
Dim i As Integer = 0
While i < countSpaces
Console.Write(" ")
i += 1
End While
Console.WriteLine(text)
For i = 0 To countSpaces - 1
Console.Write(" ")
Next
For i = 0 To text.Length - 1
Console.Write("_")
Next
End Sub
Public Shared Sub Main()
WriteUnder("Hello")
End Sub
End Class