[求助]素数问题!!
Private Sub Command1_Click()
Open "out.txt" For Output As #1
temp = isprime()
Print #1, temp
Text1.Text = temp
Close #1
End Sub
Private Sub Form_Load()
Text1.Text = ""
Command1.Caption = "计算"
End Sub
Public Function isprime() As Double
Dim i As Integer, j As Integer, temp As Long
For i = 100 To 200
For j = 1 To Int(Sqr(i))
If i Mod j = 0 Then
Exit For
Else
temp = temp + i
End If
Next
Next
End Function
哪点错了