title: problems with scanf("%d\n",&i)
body: <p>For this code:</p>
  
  <pre><code>int i;
  scanf("%d\n",&amp;i);
  </code></pre>
  
  <p>I am not able to stop my program until I input two numbers.</p>
  
  <p>I think it is very strange ,I know when the input is suitable,the scanf will return 1.
  When I input "12a 'Enter'","12 'Enter'2" and so on ,it is ok,the i=12,it seems that when I input something is different int or input a 'Enter' and something another,the scanf returns 1.</p>
  
  <p>What am I missing?</p>