vb.net – VB2010如何判断数字是否为整数
发布时间:2020-12-17 00:19:22 所属栏目:大数据 来源:网络整理
导读:我需要能够判断整数是一个整数还是有小数.因此13将是整数,23.23将是小数. 所以喜欢; If 13 is a whole number thenmsgbox("It's a whole number,with no decimals!")elsemsgbox("It has a decimal.")end if If x = Int(x) Then 'x is an Integer!'Else 'x is
我需要能够判断整数是一个整数还是有小数.因此13将是整数,23.23将是小数.
所以喜欢; If 13 is a whole number then msgbox("It's a whole number,with no decimals!") else msgbox("It has a decimal.") end if If x = Int(x) Then 'x is an Integer!' Else 'x is not an Integer!' End If (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |