title: How to force user to input a fixed amount of numbers for int?
body: <p>I want to force the user to input a number with 5 lengths long (
  no more and no less) and store them inside an int variable, this includes a leading 0.</p>
  
  <p>For example, the program should allow the user to input:</p>
  
  <pre><code>12345
  04123
  00012
  </code></pre>
  
  <p>But it should not work for:</p>
  
  <pre><code>123456
  4123
  001
  </code></pre>
  
  <p>I tried...</p>
  
  <pre><code>  if(int x &lt; 99999){
    //continue with code
    }
  </code></pre>
  
  <p>This would work only if the user input more than 5 lengths but it doesn't resolve the issue of the user putting in an int length less than 5</p>