Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
Dim a, b, m, n As Integer
a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
For n = Val(TextBox1.Text) To Val(TextBox2.Text)
If n Mod 2 = 0 And n Mod 1 = 0 Then
ListBox1.Items.Add(n)
End If
Next
For i = a To b
If i Mod a = 0 Then
ListBox2.Items.Add(i)
a = i
End If
Next
For m = a To b
If m Mod b = 0 Then
ListBox2.Items.Add(m)
b = m
End If
Next
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
Next
End Sub
End Class
Tidak ada komentar:
Posting Komentar