Possible Duplicate:
Generating non-repeating random numbers
Here is my code
NSUInteger count = 10;
for (NSUInteger i = 0; i < count; ++i) {
NSLog(@"%d",NeedRandomNumberWithoutRepeat);
}
this output should be like 8 7 9 2 1 4 6 3 5 0 Which is random and not repeating numbers