ShoutMix chat widget

Selasa, 19 April 2011

Looping


Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim j, u, y As Integer
u = 4
y = 7
For j = 1 To Val(TextBox1.Text)
If j Mod u = 0 Then
ListBox1.Items.Add(j)
u = j
Else
If j Mod y = 0 Then
ListBox1.Items.Add(j)
y = j
End If
End If
Next
End Sub
End Class