I am trying this code for generating a random number and saving the list of numbers in an array, then i am trying to delete those numbers from the list one by one which appeared once, e.g
1, 5, 9 , 4, 3, 7 ,6 ,10, 11, 8, 2 are the list of integers now 9 is appeared once and now i do not need 9 again.. this is my code of random non repeating numbers array.

```
NSMutableArray *storeArray = [[NSMutableArray alloc] init];    
BOOL record = NO;
int x;

for (int i=0; [storeArray count] < 10; i++) //Loop for generate different random values
{
    x = arc4random() % 10;//generating random number
    if(i==0)//for first time 
    {
      [storeArray addObject:[NSNumber numberWithInt:x]];  
    }
    else
    {
        for (int j=0; j<= [storeArray count]-1; j++) 
        {
                if (x ==[[storeArray objectAtIndex:j] intValue]) 
                record = YES;
        }

        if (record == YES) 
        {
            record = NO;
        }
        else
        {
            [storeArray addObject:[NSNumber numberWithInt:x]];
        }
    }
}

```