title: scanf in do-while loop
body: <p>I was wondering why does my scanf keep going when I just ask for two parameters?</p>
  
  <pre><code>do {
      scanf("%f %f\n", &amp;a,&amp;b);
      printf("a=%f; b=%f;\n",a,b);
      printf("f(a)=%f; f(b)=%f; f(a)*f(b)=%f;\n",f(a),f(b),f(a)*f(b));
  }
  while(a&gt;=b || f(a)*f(b)&gt;=0);
  </code></pre>
  
  <hr>
  
  <pre><code>1
  2
  3
  a=1.000000; b=2.000000;
  f(a)=-3.281718; f(b)=-0.610944; f(a)*f(b)=2.004947;
  1 5
  a=3.000000; b=1.000000;
  f(a)=10.085535; f(b)=-3.281718; f(a)*f(b)=-33.097884;
  </code></pre>
  
  <p>Thank you in advance</p>