title: Is there a way to continue inputs after pressing control+Z?
body: <p>The scenario is that I want to let the users to input numbers, for however many times they want, and after they press control+Z, they should still be able to input something else.</p>
  <pre><code>using namespace std;
  int main(){
      int a,b;
      while(cin&gt;&gt;a&gt;&gt;b) cout &lt;&lt; a+b&lt;&lt;endl;
      cin &gt;&gt; a;
      cout &lt;&lt; a;
  }
  </code></pre>
  <p>Although I know that the loop can be terminated by letting the user input something else, but is there anyway to work with inputs after control+Z is pressed?</p>