专科计算机网络技术课后题参考答案
session("count")= session("count")+1 '计次数
if guessnum=0 then
session("count")=0
randomize
session("number")= int(rnd*10)+1
end if
response.write "请输入1-10之间的整数:"
response.write "<input type=text name=number value=”&guessnum&” size=8> " response.write "<input type=submit value=提交> "
response.write "</form><hr><font size=5 face=隶书 color=blue> "
if session("count ")>0 then
if guessnum>session("number ") then
response.write "你猜的数太大了<br> "
elseif guessnum<session("number") then
response.write "你猜的数太小了<br> "
elseif guessnum=session("number ") then
response.write "恭喜你猜中了<br> "
end if
end if
response.write "</font>共猜了"&session("count ")& "次"
if session("count ")=5 then
response.write ",答案是"&session("number ")
end if
%>
</body>
</html>