title: Multiple scanf from a single input
body: <p>I am trying to prompt the user for a number, and then extract the number they entered and also sum the digits of the number they entered.  They can only enter the number once.  My code is below:</p>
  
  <pre><code>    printf("\nPART 2: EXPRESSIONS SUM\n\n");
      printf("Enter 5-digit integer: ");
      scanf("\n%1d%1d%1d%1d%1d", &amp;dig_one, &amp;dig_two, &amp;dig_three, &amp;dig_four, &amp;dig_five);
      scanf("\n%d", &amp;five_dig_int)
  </code></pre>
  
  <p>However after the first scanf completes, the program gets hung on the second scanf waiting for more input.  Is there a way to "re scan" so to speak on the initial input so the user does not have to enter the number again?  Thanks!
  ;</p>