Private Function IsPrimer(n As Integer) As Integer
Dim i As Integer
For i = 2 To n - 1
If n Mod i = 0 Then
Exit For
End If
Next i
If i = n Then
IsPrimer = n
Else
IsPrimer = 0
End If
End Function
Private Function IsPrimer(n As Integer) As Integer
Dim i As Integer
For i = 2 To n - 1
If n Mod i = 0 Then
Exit For
End If
Next i
If i = n Then
IsPrimer = n
Else
IsPrimer = 0
End If
End Function