title: Problem with scanf in Eclipse / MiniGW
body: <p>I'm trying to run the following code in eclipse but the console remains blank until i stop the program at which point the output "Enter next value (&lt;=0 to quit)2130567168 minutes is 35509452 hours, 48 minutes." is repeated over and over.</p>
  
  <p>It seems that scanf is putting some default value in for some reason... can't figure out why. I'm not seeing anything before the program is stopped so i thought it might have to do with printf not being flushed, but I made sure to use \n to force a flush.</p>
  
  <p>Any ideas?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  const int MIN_PER_HOUR = 60;  // minutes per hour
  
  int main(void)
  {
   int hour, min, left;
  
   printf("Convert minutes to hours and minutes!\n");
   printf("Enter the number of minutes (&lt;=0 to Quit):\n");
  
   scanf("%d", &amp;min);    // read number of minutes
  
   while(min &gt; 0){
    hour = min / MIN_PER_HOUR; // truncated number of hours
    left = min % MIN_PER_HOUR; // number of minutes left over
  
    printf("%d minutes is %d hours, %d minutes.\n", min, hour, left);
  
    printf("Enter next value (&lt;=0 to quit)");
    scanf("%d", &amp;min);
   }
   printf("Done!\n");
  
   return 0;
  }
  </code></pre>