title: c++ Outputs One Too Many Times
body: <p>I am making a program that outputs an increasing integer until it reaches 400. Even when less than 400 in for "while" is added, it always goes over once. Any Suggestions to fix?</p>
  
  <pre><code>cout &lt;&lt; "enter population of US at end of last year (in millions): ";
  cin &gt;&gt; USpop;
  
  
  
  do {
      USpop = USpop * 1.01007;
      year = year +1;
      cout&lt;&lt; "  " &lt;&lt; year  &lt;&lt; "  " &lt;&lt; setprecision(1) &lt;&lt; fixed &lt;&lt; USpop &lt;&lt;endl;
  
  } while (USpop &lt; 400);
  </code></pre>