This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: about understanding it entirely right now intRandomNumber = CInt ( Math .Floor(6) * Rnd()) + 1 End Sub Private Sub btnCheck_Click(sender As Object , e As EventArgs ) Handles btnCheck.Click 'Create intInput as variable to store user input Dim intInput As Integer = txtInput.Text 'Check user input against random number: one of three things will happen: '1. User number is higher '2. User number is lower '3. User number is the same; congrats! 'This is code that we will use by the end of the next Unit (Unit 4); try to follow along, but again, 'Don't worry too much if you do not understand all of it right now If (intInput > intRandomNumber) Then MessageBox .Show( "Your number is higher than the random number!" ) ElseIf (intInput < intRandomNumber) Then MessageBox .Show( "Your number is lower than the random number!" ) Else MessageBox .Show( "You chose the random number! Congrats!" ) End If End Sub End Class...
View Full Document
- Fall '11
- Type theory