重庆风采20选5彩票中奖统计

这是我对彩票分析最早的尝试, 从此开始用程序预测未来的想法就一直挥之不去,当然现在已经不用这么简陋的方法了. 今后有时间贴出用神经网络做的代码

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
set conn=server.createobject("adodb.connection")
conn.open "DBQ="+server.mappath("cpdata.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)}"
set rs=server.createobject("adodb.recordset")
sql="select top 51 * from cqcp205 order by cp_qs desc"
rs.open sql,conn,1,1
dim cpdata(51,10)
function checkjo(f)
if f mod 2 <> 0 then
checkjo=1
else
checkjo=0
end if
end function
function jo(a,b,c,d,e)
jo=checkjo(a)+checkjo(b)+checkjo(c)+checkjo(d)+checkjo(e)
end function
function liansu(a,b,c,d,e)
dim shu
shu=1
if a+1=b then 
shu=shu+1
end if
if b+1=c then
shu=shu+1
end if
if c+1=d then
shu=shu+1
end if
if d+1=e then
shu=shu+1
end if
liansu=shu
end function
for i= 1 to 51
'----------------------------对数据进行第一步的处理--------------------------------------------
cpjj=rs("cp_zj1")*rs("cp_zj1money")+rs("cp_zj2")*rs("cp_zj2money")+rs("cp_zj3")*rs("cp_zj3money")
cpand=rs("cp_number1")+rs("cp_number2")+rs("cp_number3")+rs("cp_number4")+rs("cp_number5")
cpdata(i,1)=rs("cp_qs")
cpdata(i,2)=rs("cp_number1")
cpdata(i,3)=rs("cp_number2")
cpdata(i,4)=rs("cp_number3")
cpdata(i,5)=rs("cp_number4")
cpdata(i,6)=rs("cp_number5")
cpdata(i,7)=cpjj
cpdata(i,8)=cpand
cpdata(i,9)=jo(rs("cp_number1"),rs("cp_number2"),rs("cp_number3"),rs("cp_number4"),rs("cp_number5"))
cpdata(i,10)=liansu(rs("cp_number1"),rs("cp_number2"),rs("cp_number3"),rs("cp_number4"),rs("cp_number5"))
rs.movenext
next
function show(a)
for i= 51 to 1 step -1
response.write "<td align=center bgcolor=#cccccc>"&cpdata(i,a)&"</td>"
next
end function
function color(a,j)
color=false
for xiang=2 to 6
if a=cpdata(j,xiang) then
color=true
end if
next
end function
function showcolor(a)
k=0
lianma1=0
lianma2=0
for j=51 to  1 step -1
if color(a,j)=true then
response.write "<td  align=center bgcolor=#FF0000>"&a&"</td>"
if j>1 then
if color(a,j)=color(a,j-1) then
lianma1=lianma1+1
end if
end if
k=k+1
else
response.write "<td align=center bgcolor=#aacccc>"&a&"</td>"
end if
if j>1 then
if color(a,j)<>color(a,j-1) then
lianma2=lianma2+1
end if
end if
next
response.write "<td nowrap align=center bgcolor=#00ccff>出现率"&k/50*100&"%</td>"
response.write "<td nowrap align=center bgcolor=#00ccff>连码率"&lianma1/50*100&"%</td>"
response.write "<td nowrap align=center bgcolor=#00ccff>变化可能性"&lianma2/50*100&"%</td>"
end function
%>
<html>
<head>
<title>205</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<table width="0" border="1" cellpadding="0" cellspacing="0">
<tr>
    <td align="center">期数</td>
    <% show(1) %>
<td align="center" bgcolor=#ccccff>重庆风采<br>205统计程序</td>
<td align="center" bgcolor=#ccccff>程式设计:<br>石卓林</td>
<td align="center" bgcolor=#ccccff>发行日期:<br>2004/7/18</td>
</tr>
<%
for i= 1 to 20 
%>
<tr>
<td align="center" ><%=i%></td>
<% showcolor(i) %>
</tr>
<% next %>
  <tr>
    <th align="center" nowrap >总奖金</th>
<% 
show(7)
function showj(a)
cpmoneyand=0
pingjun=0
bianhua=0
for showj7=51 to 1 step -1
cpmoneyand=cpmoneyand+cpdata(showj7,a)
if showj7>1 then
bianhua=bianhua+abs(cpdata(showj7,a)-cpdata(showj7-1,a))
end if
next
response.write "<td nowrap align=center bgcolor=#00cccc>总和值"&cpmoneyand&"</td>"
response.write "<td nowrap align=center bgcolor=#00cccc>平均值"&cpmoneyand/50&"</td>"
response.write "<td nowrap align=center bgcolor=#00cccc>变化率"&int(bianhua/cpmoneyand*100)&"%</td>"
end function
showj(7) 
%>
  </tr>
  <tr>
    <th align="center" nowrap >和值</th>
  <% show(8) 
  show9(8)
  %>
 
</tr>
  <tr>
    <th align="center" nowrap >奇数</th>
<% show(9) 
function show9(a)
k=0
lianma1=0
lianma2=0
k1=0
for i= 51 to 1 step -1
k=k+cpdata(i,a)
if i>1 then
k1=k1+abs(cpdata(i,a)-cpdata(i-1,a))
if cpdata(i,a)=cpdata(i-1,a) then
lianma1=lianma1+1
else
lianma2=lianma2+1
end if
end if
next
response.write "<td nowrap align=center bgcolor=#00cccc>平均值"&k/50&"变化率"&int(k1/k*100)&"%</td>"
response.write "<td nowrap align=center bgcolor=#00cccc>连码率"&lianma1/50*100&"%</td>"
response.write "<td nowrap align=center bgcolor=#00cccc>变化可能性"&lianma2/50*100&"%</td>"
end function
show9(9)
%>
</tr>
<tr>
<th align="center" nowrap>连数</th>
<% show(10) 
 show9(10)
rs.close
conn.close
set rs=nothing
set conn=nothing
 '版权所有  石卓林    %>
</tr>
</table>
</body>
</html>

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload the CAPTCHA.

Proudly powered by WordPress   Premium Style Theme by www.gopiplus.com
渝公网安渝公网安备 50010702500270号 渝ICP备09056628号-7