title: Using the return value from scanf in the C programming language as a check
body: <p>How do you use the return value from scanf to make sure it is a double I've got?</p>
  
  <pre><code>double input;
  
  do {  /* do this as long as it not a double */
    printf("Input?");
    scanf("%lf", &amp;input);
  } while(scanf("%lf", &amp;input) != 1); /* this will not work */
  </code></pre>