|
-
May 14th, 2020, 02:36 PM
#1
Thread Starter
New Member
Loop while help
Hello, i need to make my program pick 3 different numbers, but they all have to be different numbers, i know that number1 and number2 wont be the same but how to i make it check if it is equal to 2 variables for example ("Loop While (bteNombre3 = 2 variables)"). The code below is what i have so far and i need to figure out the last line, thanks!!
Randomize()
bteNombre1 = Int(9 * Rnd() + 1)
Do
Randomize()
bteNombre2 = Int(9 * Rnd() + 1)
Loop While (bteNombre1 = bteNombre2)
Do
Randomize()
bteNombre3 = Int(9 * Rnd() + 1)
Loop While (bteNombre3 is equal to bteNombre1 or bteNombre2??)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|