Private Sub Command1_Click()
Dim n%, i%
For n = 2 To 200
If prime(n) Then
Print n,
i = i + 1
If i Mod 4 = 0 Then Print
End If
Next n
End Sub
Private Function prime(m%) As Boolean
Dim i%, f As Boolean
f = True
For i = 2 To Sqr(m)
If m Mod i = 0 Then
f = False
Exit For
End If
Next i
prime = f
End Function