title: Scan statements executed before print
body: <p>I have this code.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main(void)
  {
       int dogs;
       printf("How many dogs do you have?\n");
       scanf("%d", &amp;dogs);
       printf("So you have %d dog(s)!\n", dogs);
       return 0;
  }
  </code></pre>
  
  <p>To my knowledge, when executing, the program will say 'How many dogs do you have' and I enter a number. Instead, I get a blank page, and I have to first enter a digit. Then I get</p>
  
  <p>How many dogs do you have?
  So you have 3 dog(s)! (if I input 3)</p>
  
  <p>I am using Eclipse + MinGW, and its my first time using C, so I'm not sure what I have/had to set up.</p>