title: Limiting the user input in an array
body: <p>I am working on an exercise where I need the user to input 25 values, all between 10 and 60.
  I want to validate that these values are between 10 and 60.</p>
  
  <pre><code>void main()    
  {   
      int len[25], i;    
      for (i = 0; i &lt; 25; i++)
      {
          cout &lt;&lt; "Please enter length: ";
          do
          {    
              cin &gt;&gt; len[i];          
          } while (len[i] &gt;= 10 &amp;&amp; len[i] &lt;=60);              
      }       
  }
  </code></pre>
  
  <p>This is what I've got, but it would seem to me like the user isn't limited between 10 and 60. since when I input a value that's greater than 60 for example, and try and output it later, I see it is stored in len[i] regardless.
  Any thoughts on how I would go about fixing this? Sorry, I'm a little bit of a noobie.</p>
  
  <p>Thanks!</p>