Public Class LOOPING
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim z As Byte
ListBox1.Items.Clear()
z = 1
Do Until z = 11
ListBox1.Items.Add(z)
z = z + 1
Loop
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x As Byte
x = 1
Do While x <= 10
ListBox2.Items.Add(x)
x = x + 1
Loop
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim y As Integer
For y = 20 To 1 Step -5
ListBox3.Items.Add(y & "x")
Next
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim b As Byte
b = 1
While b <= 10
ListBox4.Items.Add(b)
b = b + 1
End While
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim a As Integer
For a = 1 To 4
ListBox5.Items.Add("STMIK")
Next
End Sub
Tidak ada komentar:
Posting Komentar