Private Sub Command1_Click()
Dim K, L, M As Integer
List1.Clear
For K = Val(Text1.Text) To Val(Text2.Text) Step 2
L = K \ 2
For M = 3 To L Step 2
If K Mod M = 0 Then GoTo next_k
Next M
List1.AddItem K & " "
next_k: Next K
Label3.Caption = "Jumlah suku = " & List1.ListCount
End Sub
Selesai.
Project silahkan download disini http://www.4shared.com/archive/V7BIcaal/Prima1.html
Tidak ada komentar:
Posting Komentar