| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 584 人关注过本帖
标题:自己写的彩票软件不能在列表计算并显示2
只看楼主 加入收藏
wyq780530
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-11-12
收藏
 问题点数:0 回复次数:2 
自己写的彩票软件不能在列表计算并显示2

For x = 1 To w '4区分法
If cpssq(x, 1) <> 0 Then
a = 0
b = 0
c = 0
d = 0
e = 0
For y = 1 To 6
If cpssq(x, y) <> 17 Then
Select Case cpssq(x, y)
Case Is <= 8
a = a + 1
Case Is <= 16
b = b + 1
Case Is <= 25
c = c + 1
Case Is <= 33
d = d + 1
End Select
End If
Next y
If a > 3 Or b > 3 Or c > 3 Or d > 3 Then cpssq(x, 1) = 0
If a = a1 And b = a2 And c = a3 And d = a4 Then cpssq(x, 1) = 0
If a = 0 Then e = e + 1
If b = 0 Then e = e + 1
If c = 0 Then e = e + 1
If d = 0 Then e = e + 1
If e > 1 Then cpssq(x, 1) = 0
End If
Next x
For x = 1 To w '最小间距
If cpssq(x, 1) <> 0 Then
b = 0
mina = 6
For y = 1 To 5
a = cpssq(x, y + 1) - cpssq(x, y)
If a < mina Then mina = a
If a < 3 Then b = b + 1
Next y
If mina > 3 Then
cpssq(x, 1) = 0
If b < 3 Then cpssq(x, 1) = 0
End If
End If
Next x
For x = 1 To w '前中后4个余数不同
If cpssq(x, 1) <> 0 Then
a = cpssq(x, 1) Mod 3
b = cpssq(x, 2) Mod 3
c = cpssq(x, 3) Mod 3
d = cpssq(x, 4) Mod 3
e = cpssq(x, 5) Mod 3
f = cpssq(x, 6) Mod 3
If a = b And a = c And a = d Then cpssq(x, 1) = 0
If b = c And b = d And b = e Then cpssq(x, 1) = 0
If c = d And c = e And c = f Then cpssq(x, 1) = 0
End If
Next x
For x = 1 To w '大小尾比
If cpssq(x, 1) <> 0 Then
a = 0
b = 0
For y = 1 To 6
Select Case cpssq(x, y)
Case 1 To 4
a = a + 1
Case 5 To 9
b = b + 1
Case 10 To 14
a = a + 1
Case 15 To 19
b = b + 1
Case 20 To 24
a = a + 1
Case 25 To 29
b = b + 1
Case Else
a = a + 1
End Select
Next y
If a < 2 Or b < 2 Then cpssq(x, 1) = 0
End If
Next x
b1 = 0
b2 = 0
b3 = 0
b4 = 0
b5 = 0
b6 = 0
b7 = 0
b8 = 0
b9 = 0
b10 = 0
b11 = 0
For z = 1 To 6
Select Case cpssqup1(0, z)
Case 1 To 4
b1 = b1 + 1
Case 5 To 8
b2 = b2 + 1
Case 9 To 12
b3 = b3 + 1
Case 13 To 15
b4 = b4 + 1
Case 16 To 18
b5 = b5 + 1
Case 19 To 21
b6 = b6 + 1
Case 22 To 24
b7 = b7 + 1
Case 25 To 27
b8 = b8 + 1
Case 28 To 30
b9 = b9 + 1
Case 31 To 33
b10 = b10 + 1
End Select
Next z
For x = 1 To w '十列分析
If cpssq(x, 1) <> 0 Then
a1 = 0
a2 = 0
a3 = 0
a4 = 0
a5 = 0
a6 = 0
a7 = 0
a8 = 0
a9 = 0
a10 = 0
a11 = 0
For y = 1 To 6
Select Case cpssq(x, y)
Case 1 To 4
a1 = a1 + 1
Case 5 To 8
a2 = a2 + 1
Case 9 To 12
a3 = a3 + 1
Case 13 To 15
a4 = a4 + 1
Case 16 To 18
a5 = a5 + 1
Case 19 To 21
a6 = a6 + 1
Case 22 To 24
a7 = a7 + 1
Case 25 To 27
a8 = a8 + 1
Case 28 To 30
a9 = a9 + 1
Case 31 To 33
a10 = a10 + 1
End Select
Next y
If a1 = 0 Then
a11 = a11 + 1
If b1 = 0 Then b11 = b11 + 1
End If
If a2 = 0 Then
a11 = a11 + 1
If b2 = 0 Then b11 = b11 + 1
End If
If a3 = 0 Then
a11 = a11 + 1
If b3 = 0 Then b11 = b11 + 1
End If
If a4 = 0 Then
a11 = a11 + 1
If b4 = 0 Then b11 = b11 + 1
End If
If a5 = 0 Then
a11 = a11 + 1
If b5 = 0 Then b11 = b11 + 1
End If
If a6 = 0 Then
a11 = a11 + 1
If b6 = 0 Then b11 = b11 + 1
End If
If a7 = 0 Then
a11 = a11 + 1
If b7 = 0 Then b11 = b11 + 1
End If
If a8 = 0 Then
a11 = a11 + 1
If b8 = b8 + 1 Then b11 = b11 + 1
End If
If a9 = 0 Then
a11 = a11 + 1
If b9 = 0 Then b11 = b11 + 1
End If
If a10 = 0 Then
a11 = a11 + 1
If b10 = 0 Then b11 = b11 + 1
End If
If a11 > 6 Then cpssq(x, 1) = 0
If a11 = b11 Then cpssq(x, 1) = 0
If a1 = 0 And a2 = 0 And a3 = 0 Then cpssq(x, 1) = 0
If a2 = 0 And a3 = 0 And a4 = 0 Then cpssq(x, 1) = 0
If a3 = 0 And a4 = 0 And a5 = 0 Then cpssq(x, 1) = 0
If a4 = 0 And a5 = 0 And a6 = 0 Then cpssq(x, 1) = 0
If a5 = 0 And a6 = 0 And a7 = 0 Then cpssq(x, 1) = 0
If a6 = 0 And a7 = 0 And a8 = 0 Then cpssq(x, 1) = 0
If a7 = 0 And a8 = 0 And a9 = 0 Then cpssq(x, 1) = 0
If a8 = 0 And a9 = 0 And a10 = 0 Then cpssq(x, 1) = 0
End If
Next x
For x = 1 To w '行不空
If cpssq(x, 1) <> 0 Then
a = 0
b = 0
c = 0
d = 0
For y = 1 To 6
Select Case cpssq(x, y)
Case 3, 7, 11, 15, 18, 21, 24, 27, 30, 33
a = a + 1
Case 2, 6, 10, 14, 17, 20, 23, 26, 29, 32
b = b + 1
Case 1, 5, 9, 13, 16, 19, 22, 25, 28, 31
c = c + 1
Case Else
d = d + 1
End Select
Next y
If a = 0 Or b = 0 Or c = 0 Or d = 3 Then cpssq(x, 1) = 0
End If
Next x
b1 = 0
b2 = 0
b3 = 0
b4 = 0
b5 = 0
b6 = 0
b11 = 0
For z = 1 To 6
Select Case cpssqup1(0, z) '幸运间隔分析
Case 1, 7, 13, 19, 25, 31
b1 = b1 + 1
Case 2, 8, 14, 20, 26, 32
b2 = b2 + 1
Case 3, 9, 15, 21, 27, 33
b3 = b3 + 1
Case 4, 10, 16, 22, 28
b4 = b4 + 1
Case 5, 11, 17, 23, 29
b5 = b5 + 1
Case 6, 12, 18, 24, 30
b6 = b6 + 1
End Select
Next z
For x = 1 To w
If cpssq(x, 1) <> 0 Then
a = 0
b = 0
c = 0
d = 0
e = 0
f = 0
a11 = 0
For y = 1 To 6
Select Case cpssq(x, y)
Case 1, 7, 13, 19, 25, 31
a = a + 1
Case 2, 8, 14, 20, 26, 32
b = b + 1
Case 3, 9, 15, 21, 27, 33
c = c + 1
Case 4, 10, 16, 22, 28
d = d + 1
Case 5, 11, 17, 23, 29
e = e + 1
Case 6, 12, 18, 24, 30
f = f + 1
End Select
Next y
If a > 3 Or b > 3 Or c > 3 Or d > 3 Or e > 3 Or f > 3 Then cpssq(x, 1) = 0
If a = 0 Then
a11 = a11 + 1
If b1 = 0 Then b11 = b11 + 1
End If
If b = 0 Then
a11 = a11 + 1
If b2 = 0 Then b11 = b11 + 1
End If
If c = 0 Then
a11 = a11 + 1
If b3 = 0 Then b11 = b11 + 1
End If
If d = 0 Then
a11 = a11 + 1
If b4 = 0 Then b11 = b11 + 1
End If
If e = 0 Then
a11 = a11 + 1
If b5 = 0 Then b11 = b11 + 1
End If
If f = 0 Then
a11 = a11 + 1
If b6 = 0 Then b11 = b11 + 1
End If
If a11 = 0 Or a11 > 2 Then cpssq(x, 1) = 0
If a11 = b11 Then cpssq(x, 1) = 0
End If
Next x
For x = 1 To w '5-8,11-22,25-28
If cpssq(x, 1) <> 0 Then
a = 0
For y = 1 To 6
Select Case cpssq(x, y)
Case 5 To 8
a = a + 1
Case 11 To 22
a = a + 1
Case 25 To 28
a = a + 1
End Select
Next y
If a < 3 Or a > 5 Then cpssq(x, y) = 0
End If
Next x
For x = 1 To w '不斜连
If cpssq(x, 1) <> o Then
a1 = 0
a2 = 0
a3 = 0
a4 = 0
a5 = 0
a6 = 0
a7 = 0
a8 = 0
a9 = 0
For y = 1 To 6
Select Case cpssq(x, y)
Case 1, 13, 25
a1 = a1 + 1
Case 2, 14, 26
a2 = a2 + 1
Case 3, 15, 27
a3 = a3 + 1
Case 4, 16, 28
a4 = a4 + 1
Case 5, 17, 29
a5 = a5 + 1
Case 6, 18, 30
a6 = a6 + 1
Case 7, 19, 31
a7 = a7 + 1
Case 8, 20, 32
a8 = a8 + 1
Case 9, 21, 33
a9 = a9 + 1
End Select
Next y
If a1 = 3 Or a2 = 3 Or a3 = 3 Or a4 = 3 Or a5 = 3 Or a6 = 3 Or a7 = 3 Or a8 = 3 Or a9 = 3 Then cpssq(x, 1) = 0
End If
Next x
cpssq1 = cpssq
d = x
ReDim cpssq(1 To x, 1 To 6)
x = 1
For w = 1 To d
If cpssq1(x, 1) <> 0 Then
For y = 1 To 6
cpssq(x, y) = cpssq1(w, y)
Next y
x = x + 1
End If
Next w
w = x
For x = 1 To w
a = 0
b = 0
For y = 1 To 6
If cpssqup1(0, y) = cpssq(x, y) Then a = a + 1
Select Case cpssq(x, y)
Case Is = Val("text1.text") + 1
b = b + 1
Case Is = Val("text2.text") + 1
b = b + 1
Case Is = Val("text3.text") + 1
b = b + 1
Case Is = Val("text4.text") + 1
b = b + 1
Case Is = Val("text5.text") + 1
b = b + 1
Case Is = Val("text6.text") + 1
b = b + 1
Case Is = Val("text1.text") - 1
b = b + 1
Case Is = Val("text2.text") - 1
If cpssq(x, y) <> Val("text1.text") + 1 Then b = b + 1
Case Is = Val("text3.text") - 1
If cpssq(x, y) <> Val("text2.text") + 1 Then b = b + 1
Case Is = Val("text4.text") - 1
If cpssq(x, y) <> Val("text3.text") + 1 Then b = b + 1
Case Is = Val("text5.text") - 1
If cpssq(x, y) <> Val("text4.text") + 1 Then b = b + 1
Case Is = Val("text6.text") - 1
If cpssq(x, y) <> Val("text5.text") + 1 Then b = b + 1
End Select
Next y
If a > 1 Then cpssq(x, 1) = 0 '落号0-1个
If b = 0 Or b > 3 Then cpssq(x, 1) = 0 '邻号1-3个
Next x
For x = 1 To w '排等距号
If cpssq(x, 1) <> 0 Then
a1 = Val("text1.text") - cpssq(x, 1)
a2 = Val("text2.text") - cpssq(x, 2)
a3 = Val("text3.text") - cpssq(x, 3)
a4 = Val("text4.text") - cpssq(x, 4)
a5 = Val("text5.text") - cpssq(x, 5)
a6 = Val("text6.text") - cpssq(x, 6)
If a1 = a2 And a1 = a3 And a1 = a4 And a1 = a5 And a1 = a6 Then cpssq(x, 1) = 0
End If
Next x
a1 = 0
a2 = 0
a3 = 0
a4 = 0
a5 = 0
a6 = 0
a7 = 0
a8 = 0
a9 = 0
a10 = 0
For z = 1 To 6
Select Case cpssqup1(0, z)
Case 1, 11, 21, 31
a1 = a1 + 1
Case 2, 12, 22, 32
a2 = a2 + 1
Case 3, 13, 23, 33
a3 = a3 + 1
Case 4, 14, 24
a4 = a4 + 1
Case 5, 15, 25
a5 = a5 + 1
Case 6, 16, 26
a6 = a6 + 1
Case 7, 17, 27
a7 = a7 + 1
Case 8, 18, 28
a8 = a8 + 1
Case 9, 19, 29
a9 = a9 + 1
Case 10, 20, 30
a10 = a10 + 1
End Select
Next z

For x = 1 To w '排除号码
If cpssq(x, 1) <> 0 Then
a = 0
For y = 1 To 6
For n = 1 To 15
If cpssqpch(n) <> 0 Then If cpssq(x, y) = cpssqpch(n) Then a = a + 1
Next n
Next y
End If
If a > 2 Then cpssq(x, 1) = 0
Next x
cpssq1 = cpssq
d = x
x = 1
For w = 1 To d
If cpssq1(w, 1) <> 0 Then x = x + 1
Next w
ReDim cpssq(1 To x, 1 To 6)
x = 1
For w = 1 To d
If cpssq1(w, 1) <> 0 Then
For y = 1 To 6
cpssq(x, y) = cpssq1(x, y)
Next y
x = x + 1
End If
Next w
w = x
For x = 1 To w
zf = Str(cpssq(x, 1)) + " " + Str(cpssq(x, 2)) + " " + Str(cpssq(x, 3)) + " " + Str(cpssq(x, 4)) + " " + Str(cpssq(x, 5)) + " " + Str(cpssq(x, 6))
List1.AddItem zf
Next x
End Sub
Private Function chu3yushu(k2 As Long) As Long '除3余数函数
Select Case k2
Case 1, 10, 19, 28
chu3yushu = 1
Case 4, 13, 22, 31
chu3yushu = 2
Case 7, 16, 25
chu3yushu = 3
Case 2, 11, 20, 29
chu3yushu = 4
Case 5, 14, 23, 32
chu3yushu = 5
Case 8, 17, 26
chu3yushu = 6
Case 3, 12, 21, 30
chu3yushu = 7
Case 6, 15, 24, 33
chu3yushu = 8
Case 9, 18, 27
chu3yushu = 9
End Select
End Function
Private Function jiou(k1 As Long) As Long '奇偶函数
If k1 Mod 2 = 0 Then
Select Case k1
Case 10, 20, 30
jiou = 6
Case 2, 12, 22, 32
jiou = 7
Case 4, 14, 24
jiou = 8
Case 6, 16, 26
jiou = 9
Case 8, 18, 28
jiou = 10
End Select
End If
If k1 Mod 2 = 1 Then
Select Case k1
Case 1, 11, 21, 31
jiou = 1
Case 3, 13, 23, 33
jiou = 2
Case 5, 15, 25
jiou = 3
Case 7, 17, 27
jiou = 4
Case 9, 19, 29
jiou = 5
End Select
End If
End Function

Private Sub Text9_Change()

End Sub

搜索更多相关主题的帖子: 彩票 软件 列表 
2007-11-12 12:05
zjl138
Rank: 1
等 级:新手上路
威 望:1
帖 子:788
专家分:0
注 册:2007-11-12
收藏
得分:0 
我要成为正式会员.

i like linux...
2007-11-12 13:30
城镇农民
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2007-11-12
收藏
得分:0 
什么语言写的?

2007-11-12 14:46
快速回复:自己写的彩票软件不能在列表计算并显示2
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021826 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved