While Loop stops working before condition C++ : <p>The while loop should stop at 12 but ends at 9. Also, please ignore I spelled inches incorrectly.</p>

<pre><code>int main() { 
  double rainFall[12]; 
  int i = 0; 

  while(rainFall[i] &gt; 0 &amp;&amp; i &lt; 12 ){ 

    cout &lt;&lt; "Enter your rainfaill in incehs for month #" &lt;&lt; i + 1 &lt;&lt; ": " ; 
    cin &gt;&gt; rainFall[i]; 
    i++;
  }
} 
</code></pre>

<p>Input / Output: 
Enter your rainfaill in incehs for month #1: 9 </p>

<p>Enter your rainfaill in incehs for month #2: 9 </p>

<p>Enter your rainfaill in incehs for month #3: 9</p>

<p>Enter your rainfaill in incehs for month #4: 9</p>

<p>Enter your rainfaill in incehs for month #5: 9</p>

<p>Enter your rainfaill in incehs for month #6: 9</p>

<p>Enter your rainfaill in incehs for month #7: 9</p>

<p>Enter your rainfaill in incehs for month #8: 9</p>

<p>Enter your rainfaill in incehs for month #9: 9</p>
