<%
dim intnum(4)
intnum(0)=request.form("number1")
intnum(1)=request.form("number2")
intnum(2)=request.form("number3")
intnum(3)=request.form("number4")
intnum(4)=request.form("number5")
response.write(intnum(0))
response.write(intnum(1))
response.write(intnum(2))
response.write(intnum(3))
response.write(intnum(4))
response.write "<br>"
%>
<%
dim ran(4)
for inti=0 to 4 step 1
Randomize()
ran(inti)=Int(Rnd*9)+1
next
response.write(ran(0))
response.write(ran(1))
response.write(ran(2))
response.write(ran(3))
response.write(ran(4))
response.write("<br>")
%>
<%
dim inti,intj,intfrequency
intfrequency=0
for inti=0 to 4 step 1
select case intnum(inti)
case ran(0): intfrequency=intfrequency+1
case ran(1): intfrequency=intfrequency+1
case ran(2): intfrequency=intfrequency+1
case ran(3): intfrequency=intfrequency+1
case ran(4): intfrequency=intfrequency+1
end select
next
response.write(intfrequency)
%>
請問為什麼我在測試列印response.write(intfrequency)
他都只顯示0
是在select case裡面有錯嗎?還是其他地方?
還有各位覺得我還有什麼地方可以改進的嗎?
我寫的是1~9號的樂透
新手上路還望多多指教