title: How to end the line on c++ using loops
body: <p>How do I end this loop and go to the next line? I want the loop to produce horizontally and then I want to be able to move on to the next line, but if I put "endl;" after my cout statement in the loop, it outputs the numbers vertically. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;cmath&gt;
  
  using namespace std;
  
  int main() {
      const int WMAX = 45,
      WMIN = 5;
      int wind;
      wind= WMIN;
  
  
      cout&lt;&lt; "Temp | -------------- Wind Speed --------------" &lt;&lt;endl;
  
      while (wind&gt;=WMIN &amp;&amp; wind&lt;=WMAX) {
          cout&lt;&lt; setw(10) &lt;&lt; wind &lt;&lt; setw(5) &lt;&lt; endl;
          wind+=5;
      }
  
  }
  </code></pre>