In my code I generate six random numbers between 1-5.
RandomNumber1 = arc4random_uniform(5) + 1
RandomNumber2 = arc4random_uniform(5) + 1
RandomNumber3 = arc4random_uniform(5) + 1
RandomNumber4 = arc4random_uniform(5) + 1
RandomNumber5 = arc4random_uniform(5) + 1
RandomNumber6 = arc4random_uniform(5) + 1
With these numbers, I want to check how many duplicates there are. Two scenarios: I want to execute one code if there are 5 different numbers, and another code if there isn't. Example;
1, 2, 3, 4, 5, 5
Here are 5 different numbers (only one pair)
1, 1, 2, 2, 3, 4
Here are not 5 different numbers (two pairs)