全站数据
8 4 2 0 5 8 1

正整数的表示方法

今跃寄宿考研 | 简单学习,快乐成才!         
问题更新日期:2024-10-11 19:15:42

问题描述

正整数的表示方法,麻烦给回复
精选答案
最佳答案

Private Sub Command1_Click()

If CheckInt(Text2.Text) = True Then

MsgBox "正整数"

Else

MsgBox "不是正整数"

End If

End Sub

Function CheckInt(ByVal str As String) As Boolean

If InStr(1, str, ".") = 0 Then

If str > 0 Then

CheckInt = True

Else

CheckInt = False

End If

Else

CheckInt = False

End If

End Function

'日曜星君

其他回答

应该是正整数集,用数学符号表示为N+或N*

其他回答

正整数集可以用符号N+、N*、N1、N>0表示。其中,N表示自然数集,Z表示整数集,+表示该数集中的元素都为正数,*表示在剔除该数集的元素0。