Pages

Monday, March 4, 2013

Random Number between some number in xCode


Here is the code to find the Random Values between some numbers in Objective C

int minValue = 100;
int maxValue = 4500;
int rangeValue = maxValue - minValue;
int actualValue = (arc4random() % rangeValue) + minValue;