level 4
0ices
楼主
Private Sub Form_Load()
Dim a As Single, b As Single, c As Single, d As Integer
a = Text1.Text
b = Text2.Text
c = Text3.Text
If b <= a Or a < 0 Or c > b Or c < a Then
Label5.Caption = "商品价格有误"
End If
Randomize
d = Int(Rnd * (b - a + 1)) + a
If d = c Then
Label5.Caption = "猜对了!"
Label5.ForeColor = &HFF&
ElseIf d > c Then
Label5.Caption = "高了"
Else
Label5.Caption = "低了"
End If
End Sub
2014年07月11日 01点07分
1
Dim a As Single, b As Single, c As Single, d As Integer
a = Text1.Text
b = Text2.Text
c = Text3.Text
If b <= a Or a < 0 Or c > b Or c < a Then
Label5.Caption = "商品价格有误"
End If
Randomize
d = Int(Rnd * (b - a + 1)) + a
If d = c Then
Label5.Caption = "猜对了!"
Label5.ForeColor = &HFF&
ElseIf d > c Then
Label5.Caption = "高了"
Else
Label5.Caption = "低了"
End If
End Sub
