title: scanf (WITH the space after %d) not working before gets
body: <p>I'm a total C noob and i had quite a similar question about scanf which was answered and again, I came here out of total desperation. Every question i read about here (about scanf before gets) was answered in "put an extra space after %d for example" and it works here:</p>
  
  <pre><code>    int month,day;char waste[10];
      printf("Enter month: ");scanf("%d",&amp;month);
      printf("Enter day: ");scanf("%d ",&amp;day);
      //printf("break!");
      gets(waste);
      printf("month: %d, day: %d\n",month,day);
      puts(waste);
  </code></pre>
  
  <p>but if the "//printf("break!");" line gets uncommented, something strange happens! first the first three lines run and you have to enter the two scanfs, but after the second scanf, " gets(waste) " runs AND THEN the " printf("break!") " IN THE LINE BEFORE IT! here's the code from my terminal.</p>
  
  <pre><code>Enter month: 11
  Enter day: 2
  sssd
  break!month: 11, day: 2
  sssd
  </code></pre>
  
  <p>That's some paranormal ish to me. how do you think I can fix this?</p>