回复:(multiple1902)我根本不晓得楼主哪步不会做,...
我做了一个,你看一下哪错了.我执行不出来,估计毛病很多吧.谢谢啊
Dim n As Integer
Private Sub Command1_Click()
n = Val(Text4.Text)
End Sub
Private Sub Command2_Click()
Dim i%, j%, s%, x%
Randomize
For i = 1 To 10
x = Int(Rnd * 101)
For j = n To 1 Step -1
If Val(Text1.Text) > x Then
Text2.Text = "大了,还有" & (i - 1) & "次机会"
ElseIf Val(Text1.Text) < x Then
Text2.Text = "小了,还有" & (i - 1) & "次机会"
Else
Text2.Text = "true"
End If
Exit For
Next j
If Text2.Text = "true" Then
s = s + 10
Text3.Text = s
Else
s = s - 10
Text3.Text = s
End If
Next i
If s = 100 Then Text2.Text = "clever"
End Sub
Private Sub Command3_Click()
Unload Me
End Sub