Jumat, 04 Maret 2011

Latihan Pertemun 4


Public Class Form1

Private Sub ListBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox3.SelectedIndexChanged

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b As Integer
For a = 2 To 6
ListBox1.Items.Add("*" & a)
ListBox1.Items.Add(a + 1)
Next
For b = 1 To Val(TextBox1.Text)
If b Mod 4 <> 0 Then
ListBox2.Items.Add(b)
End If
If b Mod 3 = 2 Then
ListBox3.Items.Add(b)
End If
Next
End Sub
End Class

Tidak ada komentar:

Posting Komentar