VB 如何判断6个数字中的连号?
答案:2 悬赏:60 手机版
解决时间 2021-03-23 07:58
- 提问者网友:佞臣
- 2021-03-22 23:30
VB 如何判断6个数字中的连号?
最佳答案
- 五星知识达人网友:雾月
- 2021-03-23 00:21
Private Sub Command1_Click()
Dim cs As Integer
Dim j As Integer
fl = Split(Text1.Text, " ")
cs = 0
j = 0
For i = 0 To UBound(fl) - 1
If Int(Int(fl(i)) + 1) = Int(fl(i + 1)) Then
cs = cs + 1
Else
cs = 0
End If
If cs = 1 Then j = j + 1
Next
Label1.Caption = "共有:" & j & " 组连号"
End Sub
Dim cs As Integer
Dim j As Integer
fl = Split(Text1.Text, " ")
cs = 0
j = 0
For i = 0 To UBound(fl) - 1
If Int(Int(fl(i)) + 1) = Int(fl(i + 1)) Then
cs = cs + 1
Else
cs = 0
End If
If cs = 1 Then j = j + 1
Next
Label1.Caption = "共有:" & j & " 组连号"
End Sub
全部回答
- 1楼网友:轻熟杀无赦
- 2021-03-23 01:26
80000元
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯