title: Infinite loop in C wont stop for scanf
body: <p>I started learning C and i am still at simple programs but with a ton of errors :/
  The following code once it catches the wrong input (in the else statement) will continue running and it wont stop for the next scan... why is that happening?</p>
  
  <pre><code>const float inch_to_cm = 2.54;
  
  int main()
  {
      bool run = true;
      float usr_input;
      while(run){
          printf("Please enter the inches: ");
          if (scanf("%f", &amp;usr_input) == 1){
              printf("Result: %4.2f \n", inch_to_cm*usr_input);
              run = false;
          }
          else{
              printf("I asked for a number!\n");
          }
      }
  
      return 0;
  }
  </code></pre>