Private Sub Form_Load()
Dim s As Integer, n As Integer
Show
s = 0: n = 2
Do While n <= 100
s = s + n
n = m
Dim x As Integer
Dim flag As Boolean
x = m - 1
flag = False
While x >= 2
If m Mod x = 0 Then
flag = True
End If
x = x - 1
Wend
If flag = True Then
Form1.Caption = m
Loop
Print "100以内素数的和是"; s
s = Int(Val(text1.Text))
End Sub