请高手推荐一款合适的软件

来源:百度知道 编辑:UC知道 时间:2024/06/27 05:04:23
我有N多组6个数的数据,我想在其中找出6个数里面有2个数是连号的组合
举例 29 30 13 5 1 15 这个组合就满足条件29和30是连号
我想请高手帮助我推荐一款合适的软件
或者直接帮助我写条程序(注明怎么用) 谢谢

这个是vb代码,具体我没有用过,你自己拿去试试吧
Dim a, b, c, d, e, f As Integer
Private Sub Command1_Click()
a = Text1.Text
b = Text2.Text
c = Text3.Text
d = Text4.Text
e = Text5.Text
f = Text6.Text
g = Text7.Text
If a = b - 1 Or a = b + 1 Then
Text7.Text = g + "第一框和第二框"
End If
If a = c + 1 Or a = c - 1 Then
Text7.Text = g + "第一框和第三框"
End If
If a = d + 1 Or a = d - 1 Then
Text7.Text = g + "第一框和第四框"
End If
If a = e + 1 Or a = e - 1 Then
Text7.Text = g + "第一框和第五框"
End If
If a = f + 1 Or a = f - 1 Then
Text7.Text = g + "第一框和第六框"
End If
If b = c + 1 Or b = c - 1 Then
Text7.Text = g + "第二框和第三框"
End If
If b = d + 1 Or b = d - 1 Then
Text7.Text = g + "第二框和第四框"
End If
If b = e + 1 Or b = e - 1 Then
Text7.Text = g + "第二框和第五框"
End If
If b = f + 1 Or b = f - 1 Then