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


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 arthurliu 的頭像
    arthurliu

    arthurliu's blog

    arthurliu 發表在 痞客邦 留言(0) 人氣()