用VB设计程序,输入一个数,判断其是否为整数并输出判断结果

请问各位这题怎么做,麻烦各位解答一下!!!...
2026年09月24日 18:38
有2个网友回答
网友(1):

n=val(inputbox("输入:"))
if int(n)=n then
msgbox"是整数"
else
msgbox"不是整数"
endif

网友(2):

没有背语法, 大致是这样吧...

public isInt (byval a as double) as boolean
if int(a) = a then
isInt = true
end if
end function