title: How can I get an int from stdio in C?
body: <p>I have significant trouble with this...</p>
  
  <pre><code>printf("&gt; ");
  int x = getchar();
  
  printf("got the number: %d", scanf("%d", &amp;x));
  </code></pre>
  
  <h2>Output</h2>
  
  <pre><code>&gt; 1234
  got the number: 1
  </code></pre>