close
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim myfile As Integer = My.Computer.FileSystem.ReadAllText("c:\vb\940303.SM")
Dim i As Integer
For i = 2 To myfile - 1
If myfile Mod i = 0 Then
TextBox3.Text = myfile & "非質數"
Exit For
Else
TextBox3.Text = myfile & "是質數"
End If
Next
End Sub
全站熱搜
留言列表