title: How to generate random 6 digits number by a button?
body: <p>I tried random generate number from 1 to 100.How to change random <strong><em>6 digits</em></strong> ?</p>
  
  <p>Note :<strong><em>Numbers can not start with 0(zero)</em></strong></p>
  
  <p>Random from 1 to 100 codes</p>
  
  <pre><code> #import &lt;UIKit/UIKit.h&gt;
  
   @interface RandomNumberGenViewController : UIViewController {
  
   int number;
   IBOutlet UILabel *label;
  
   }
  
   -(IBAction)generateNumber:(id)sender;
  
   @end
  
  
  
   @implementation RandomNumberGenViewController
  
   -(IBAction)generateNumber:(id)sender {
  
   number = (arc4random()%100)+1; //Generates Number from 1 to 100.
   NSString *string = [NSString stringWithFormat:@"%i", number];
   label.text = string
  
   }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/6lq4A.png" alt="enter image description here"></p>