编写一个函数用于判断给定的任意正整数是否是素数,

日期:2016-07-21 11:01:30 人气:1

编写一个函数用于判断给定的任意正整数是否是素数,

Private Sub Form_Load() Dim sNum As Single sNum = InputBox("请输入一个正整数") If ZhiShu(sNum) Then MsgBox "1" Else MsgBox "0" End If End Sub Function ZhiShu(N As Single) As Boolean Dim I As Integer ZhiShu = True
    A+
热门评论