Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim i As Integer = 1
        Dim S As String = ""

        While (i <= 10)
            S = S & i & " : "
            i = i + 1
        End While

        RichTextBox1.Text = S

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

        Dim i As Integer = 1
        Dim S As String = ""

        Do While (i <= 10)
            S = S & i & " : "
            i = i + 1
        Loop

        RichTextBox2.Text = S

    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

        Dim i As Integer = 1
        Dim S As String = ""

        Do Until (i > 10)
            S = S & i & " : "
            i = i + 1
        Loop

        RichTextBox3.Text = S
    End Sub

    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        Dim i As Integer = 1
        Dim S As String = ""

        Do
            S = S & i & " : "
            i = i + 1
        Loop While (i <= 10)

        RichTextBox5.Text = S
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        Dim i As Integer = 1
        Dim S As String = ""

        Do
            S = S & i & " : "
            i = i + 1
        Loop Until (i > 10)

        RichTextBox4.Text = S
    End Sub
End Class
