第1个回答 2012-05-12
Private Sub Command1_Click()
Dim i As Integer
For i = 3 To 200
If MySuShu(i) Then Print i
Next i
End Sub
Private Function MySuShu(ByVal n As Integer) As Boolean
Dim i As Integer
Dim YesNo As Boolean
i = 2
YesNo = True
Do While i <= n - 1 And YesNo
If n Mod i = 0 Then YesNo = False
i = i + 1
Loop
MySuShu = YesNo
End Function本回答被提问者采纳