Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
To define multiple values such as define number 3,4 in objective c? And have it randomly chosen?
これを試して:
int r = 3 + arc4random() % 2;
arc4random() % 20または1をランダムに返します。3を追加すると、3から4の間でランダムに選択されます。
arc4random() % 2