我这个代码为什么错了?
qbasic吧
全部回复
仅看楼主
level 5
老师说这个不符合要求,生成的数字不是完全打乱的
'Guess number game
'Writed by Bean
let life=5
randomize 0
ret:
target% = rnd*10
print "Guess a number! (0 to 10)"
lret
input "Guess one!";guess%
if guess% = target% then
print "Good job! You won!"
life=life+1
goto ret
else
print "No...you still have";life;"time(s) to guess."
life=life-1
goto lret
省略了一些代码 是有关播放声音的
2013年01月24日 10点01分 1
level 14
lret
后面没有冒号……。
2013年01月25日 15点01分 2
...不是这个啦...
2013年01月26日 09点01分
当你用randomize 0 时,就代表着你的代码产生的随机数是固定的了……。
2013年02月02日 11点02分
回复@tsliuhaitao :谢谢,问题已经解决了
2013年02月02日 11点02分
客气了……。
2013年02月05日 11点02分
1