VB while语句Private Sub Command2_Click()Dim x As SingleDim y As SingleRandomizex = Int(Rnd * 900) + 1Randomizey = Int(Rnd * 900) + 1t = Text1.Textr = 0While r < tIf 0 < x And x < 300 Then m = 1 ElseIf 3 < x And x
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/07 20:47:09
VB while语句Private Sub Command2_Click()Dim x As SingleDim y As SingleRandomizex = Int(Rnd * 900) + 1Randomizey = Int(Rnd * 900) + 1t = Text1.Textr = 0While r < tIf 0 < x And x < 300 Then m = 1 ElseIf 3 < x And x
VB while语句
Private Sub Command2_Click()
Dim x As Single
Dim y As Single
Randomize
x = Int(Rnd * 900) + 1
Randomize
y = Int(Rnd * 900) + 1
t = Text1.Text
r = 0
While r < t
If 0 < x And x < 300 Then
m = 1
ElseIf 3 < x And x
VB while语句Private Sub Command2_Click()Dim x As SingleDim y As SingleRandomizex = Int(Rnd * 900) + 1Randomizey = Int(Rnd * 900) + 1t = Text1.Textr = 0While r < tIf 0 < x And x < 300 Then m = 1 ElseIf 3 < x And x
“t = Text1.Text”中t的数据类型为字符串型无法和整形比较,你可以将此句该为“t=int(Text1.text)或者t=val(Text1,text)”