Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TextWindow.WriteLine("Guess a number between 1-100")
- guess = Math.GetRandomNumber(100)
- Sub number
- num2 = TextWindow.ReadNumber()
- If numguess = 0 Then
- numguess = numguess + 1
- EndIf
- If num2 > guess Then
- TextWindow.WriteLine("Your guess is too high")
- numguess = numguess + 1
- number()
- ElseIf num2 < guess then
- TextWindow.WriteLine("Your guess is too low")
- numguess = numguess + 1
- number()
- elseif num2 = guess Then
- TextWindow.Clear()
- TextWindow.WriteLine("The number " + guess + " was correct! It took you " + numguess + " tries.")
- EndIf
- EndSub
- number()
Advertisement
Add Comment
Please, Sign In to add comment