In researching random number generation there seems to be alot of discussion as to the best way to go. These are the two ways I consider:

int generated = arc4random() % 10;
generated will be an integer between 0 and 10.

or

srandom( time(NULL) );
int generated = ( random() % 10 );

Sorry, the comment form is closed at this time.

© 2012 James Border Suffusion theme by Sayontan Sinha