Belajar Perulangan VB.NET

BELAJAR PERULANGAN VB.NET



Public Class Form6


    Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim halaman As Byte
        For halaman = 1 To 10
            ComboBox1.Items.Add(halaman)
        Next

        Dim page As Byte
        page = 1
        While page <= 10
            ComboBox2.Items.Add(page)
            page = page + 1
        End While

        Dim i As Byte
        i = 1
        Do While i <= 10
            ListBox1.Items.Add(i)
            i = i + 1
        Loop

        Dim j As Byte
        j = 1
        Do Until j = 11
            ListBox2.Items.Add(j)
            j = j + 1
        Loop

        Dim k As Integer
        For k = 10 To 1 Step -1
            ListBox3.Items.Add(k)
        Next

        Dim l As Integer
        l = 10
        Do While l >= 1
            ListBox4.Items.Add(l)
            l = l - 1
        Loop

        Dim h As Integer
        For h = 1 To 10
            ListBox5.Items.Add(h)
            h = h + 1 Mod 2
        Next

        Dim m As Integer
        For m = 10 To 1 Step -2
            ListBox6.Items.Add(m)
        Next
    End Sub
End Class
Belajar Perulangan VB.NET Belajar Perulangan VB.NET Reviewed by Pak Gulo on November 30, 2015 Rating: 5

Tidak ada komentar:

Diberdayakan oleh Blogger.