   Visual Basic Random number
  Hello. Recently playing in the VB and I have a problem with the lottery numbers. Namely, that they were drawn from a range of pressing the button.Here's the code that already have:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click   Label9.Visible = False   Label2.Visible = True   Label3.Text = CStr(Int(Rnd() * 100))   Label4.Text = CStr(Int(Rnd() * 100))   Label5.Text = CStr(Int(Rnd() * 100))   Label6.Text = CStr(Int(Rnd() * 100))   Label7.Text = CStr(Int(Rnd() * 100))   Label8.Text = CStr(Int(Rnd() * 100))    End SubEnd ClassAnd my point is here that the figures were drawn from a specific range. Let's say from 1 to 21.Thanks in advance   
  Not sure I fully understand the question, and I can't help on the VB, but lottery numbers are drawn uniquely from a range, not just a list of random numbers.For example, to generate the equivalent of lottery numbers from the range 1-21, I'd create an array of the full 21 numbers, randomly shuffle the array, then return the first six numbers in the array.The best form of random shuffle I know is to iterate over the array in order and for each item, select a random index and swap the current item with that index.   