- Home
·
- Math/Dates
·
- Create a list of NON-REPETITIVE, randomly-generated numbers in any range! This time, you can custom
Create a list of NON-REPETITIVE, randomly-generated numbers in any range! This time, you can custom
Create a list of NON-REPETITIVE, randomly-generated numbers in any range! This time, you can customize it!
Rate Create a list of NON-REPETITIVE, randomly-generated numbers in any range! This time, you can custom
(2(2 Vote))
Dim MinVal As Integer, MaxVal As Integer
MinVal = 1
MaxVal = 20
Dim Sequence(MinVal To MaxVal) As Integer
For i = MinVal To MaxVal
redo:
Sequence(i) = Int(Rnd * (MaxVal - MinVal + 1)) + MinVal
If i > 1 Then
For j = 1 To i - 1
If Sequence(j) = Sequence(i) Then GoTo redo
Next j
End If
Next i
Text1.Text = ""
For k = MinVal To MaxVal
Text1.Text = Text1.Text & Sequence(k)
If k < 20 Then Text1.Text = Text1.Text & ", "
Next k
End Sub
Create a list of NON-REPETITIVE, randomly-generated numbers in any range! This time, you can custom Comments
No comments yet — be the first to post one!
Post a Comment