title: Multi-line stdin - C++
body: <p>So if i have a program that takes stdin such as</p>
  
  <pre><code>1
  5
  2
  4
  </code></pre>
  
  <p>How exactly can i go through each line and say print that value, This is what im thinking:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
  
    while ( // input has ended// ) {
    cout &lt;&lt; //current line//
  
    //increment to next line//
  
   }     
  
    return 0;
  }
  </code></pre>
  
  <p>Is there such a way or no?</p>