I have generated four random numbers between 1 and 5 in a C# program, rndNumberA, rndNumberB, rndNumberC, rndNumberD..
I need to make sure none of the numbers are the same, and assign a new number if they are.
Can anyone help?
Thanks in advance : )
Checking Numbers in C#?
Repeat
rndNumberA
rndNumberB
rndNumberC
rndNumberD
Until(NumberA%26lt;%26gt;NumberB or NumberC or NumberD and NumberB%26lt;%26gt;NumberC or NumberD and NumberC%26lt;%26gt;NumberD)
orange
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment