Q:

In xcode, can I make random() or arc4random choose from a set? 

Suppose I have a list of numbers, ie. ( 240, 320, 640, 920) and I want to select one of these four numbers at random.   Can I do this with random or arc4random? 

A:

Yes, but you'll need to use an array:
int numbers[4] = {240,320,640,920};
int random = numbers[(arc4random()%4)];

By the way, arc4random() is a lot better than random() because it doesn't need to be seeded. 

A:

int values[4] = {240, 320, 640, 920};
int value = values[random() % 4];

