blackjack visual basic code
Visual Basic Random Numbers?
What is the Visual Basic (Visual Studio Pro 2008) to generate a random integer without repeats 1-21 as a code for the blackjack? Thanks
Hello, Try this code, which is a function that is a random number and makes sure that its not in the numbers marked. CalledNumbers dom (20) Whole total As Integer = 0 RandomNumberWithoutRepeats function () As New Random rand integer as Dim i As Integer i = 0 C = rand.Next (1, 22) "The second question is noninclusive! CalledNumbers.Contains loop while (i) = False CalledNumbers (total) = Total I + = 1 return i End Function
Blackjack Visual Basic