第1个回答 推荐于2016-10-23
Private Sub Command1_Click()
Dim i As Integer, s As Integer
For i = 100 To 200
If f1(i) Then
Print i;
s = s + 1
If s Mod 7 = 0 Then Print
End If
Next
Print
Print "个数:";
Print s
End Sub
Public Function f1(x As Integer) As Boolean
Dim n As Integer
n = 1
Do While n < x
n = n + 1
If x Mod n = 0 Then
f1 = False
Exit Do
End If
Loop
If n >= x Then f1 = True
End Function本回答被提问者采纳