Skip to content

Instantly share code, notes, and snippets.

@CaptainMalReynolds
Created August 3, 2013 01:11
Show Gist options
  • Save CaptainMalReynolds/6144632 to your computer and use it in GitHub Desktop.
Save CaptainMalReynolds/6144632 to your computer and use it in GitHub Desktop.
NSMutableArray *storeArray = [[NSMutableArray alloc] init];
int x;
for (int i=0; [storeArray count] < 10; i++)
{
x = arc4random_uniform(10);
if(![storeArray containsObject:[NSNumber numberWithInt:x]])
{
[storeArray addObject:[NSNumber numberWithInt:x]];
}
}
NSLog(@"Your array is : %@",storeArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment