- Home
·
- Games
·
- This is a more up to date version of the number guessing game than previously submitted, all you ne
This is a more up to date version of the number guessing game than previously submitted, all you ne
This is a more up to date version of the number guessing game than previously submitted, all you need is two cmd buttons. cmplay, and cmdquit
API Declarations
Dim guess As Integer
Dim number As Integer
Dim counter As Integer
Rate This is a more up to date version of the number guessing game than previously submitted, all you ne
(1(1 Vote))
On Error GoTo Error
Randomize
number = Int(1000 * Rnd) + 1
counter = 0
Do
guess = InputBox("I am thinking of a number please have a guess at what it is.")
If guess > 1000 Then
GoTo Error
End If
If guess = number Then
MsgBox ("Spot on")
End
If guess > number Then
MsgBox ("your guess is too high")
Else
MsgBox ("your guess is too low")
End If
End If
counter = counter + 1
Loop Until counter = 10
MsgBox ("Sorry the number was ") & number
Error:
MsgBox ("Please input a valid number between 1 and 1000 inclusive.")
End Sub
Private Sub cmdquit_Click()
End
End Sub
This is a more up to date version of the number guessing game than previously submitted, all you ne Comments
No comments yet — be the first to post one!
Post a Comment