title: Code runs fine but stops randomly halfway through execution
body: <p>So I've been working on the Harvard CS50 course on iTunes U and have run into a bit of a problem. The code runs and then stops. I explain the issue where the code is giving me trouble.</p>
  
  <pre><code>// Program calculates the amount of change you can give with the least amount of coins.
  
   #include &lt;stdio.h&gt;
   #include &lt;cs50.h&gt;
   #include &lt;math.h&gt;
  
  int
  main(void)
  {
  
      float change = 0, inputflag = 1;
      int changeint = 0;
      int quarter = 25, dime = 10, nickel = 5, penny = 1; // Coins and values
      int qc = 0, dc = 0, nc = 0, pc = 0; // Coin value change (Qc = Quarter Change)
  
  // Prompts user for input and validates. 
  
      while (inputflag == 1)
       {
          printf("How much change? ");
          change = GetFloat();
  
          if (change == 0)
          {
              printf("You have no change!\n");
              inputflag = 0;
          }
          else if (change &gt; 0)
          {
              printf("%.2f\n", change);
              inputflag = 0;
          }
          else
          {
              printf("Please enter a non-negative number! \n");
          }
       } 
  </code></pre>
  
  <p>The program stops here. I run the code, input an acceptable value and then the program stops running. It doesn't move onto the part below.</p>
  
  <p>I have spent the last hour going over this and still can't figure out what is keeping the program from running. The inputflag value gets set to 0 thus breaking the first while loop and then should move on below if (change != 0) which it doesn't...So any advice would be greatly appreciated. </p>
  
  <pre><code>    if (change != 0) // If the change is zero, this section is skipped
          {
              changeint = round(100 * change);
              printf("%d", changeint);
          }
  
        // The following four sections subtract coin amount, compare it, and add 1 to count.  
            while (changeint &gt;= quarter);    
            {   
                 changeint = changeint - quarter;
                 qc = qc + 1;
            }
  
            while (changeint &gt;= dime);
            {
                 changeint = changeint - dime;
                 dc = dc + 1;
            }
  
            while (changeint &gt;= nickel);
            {
                 changeint = changeint - nickel;
                 nc = nc + 1;
            }
  
            while (changeint &gt;= penny);
            {
                 changeint = changeint - penny;
                 pc = pc + 1;
            }
  
  //Prints output
  
            printf("You owe a total of %d coins!", qc + dc + nc + pc);
  
  }
  </code></pre>