Private Sub Command1_Click()For i = 3 To 100 For j = 2 To Sqr(i) If i Mod j = 0 Then Exit For Next If j > Int(Sqr(i)) Then s = s & i & " "NextMsgBox sEnd Sub
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97