PHP Module

Home Cocoa tips Generation random numbers
Generation random numbers PDF Print E-mail
Written by Ivan Fernandes   
Tuesday, 13 April 2010 14:47

To generate a Random number in Objective-C:

 
    int randomValue = arc4random() % 10;
 

The above code shows how to generate an integer between 0 and 10.

 
Copyright © 2017 Bright Idea Software. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.