-
-
Save anonymous/ac79c5ace55a78476fd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Public Array | |
Dim intLotNums(9) As Integer | |
'RNG Code | |
Dim intNewNum As Integer | |
Dim mGenRand As Random = New Random | |
Dim intCount As Integer = 0 | |
For i = LBound(intLotNums) To UBound(intLotNums) | |
intNewNum = mGenRand.Next(intLowLmt, intUpLmt + 1) | |
intLotNums(intCount) = intNewNum | |
intCount += 1 | |
Next | |
For intCount = 0 To 9 | |
Debug.WriteLine(intLotNums(intCount)) | |
Next | |
'Test guess code | |
Dim dblGuessNum As Double = CDbl(txtGuessNumber.Text) | |
For i = LBound(intLotNums) To UBound(intLotNums) | |
If dblGuessNum = CDbl(intLotNums(i)) Then | |
MsgBox("Congratulations you won the lottery!") | |
End If | |
Next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment