Skip to content

Instantly share code, notes, and snippets.

Created May 8, 2013 21:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/ac79c5ace55a78476fd9 to your computer and use it in GitHub Desktop.
'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