title: scanf in loop should react to EOF signal, but it does not
body: <p>I have this piece of code which reads numbers <code>float</code> and it should stop after receiving <code>EOF</code> single <kbd>Ctrl</kbd><kbd>D</kbd> but it just doesn't react. </p>
  
  <p>Any help please? </p>
  
  <p>(I know it looks weird but that <code>-1</code> control is there for a reason.)</p>
  
  <pre><code>do {
    f++;
    scanf("%f",&amp;paid[f]);
  } while(paid[f-1] != 0 &amp;&amp; paid[f] != EOF);
  </code></pre>