title: Fortran 95 Do-While Loop Not Exiting on False Condition
body: <p>Here is my code:</p>
  
  <pre><code>program change 
  
              integer:: amount, remainder, q, d, n, p
              amount = 47
              remainder = amount
              print*,remainder
              q = 0
              d = 0
              n = 0
              p = 0
  
              do while (remainder &gt;= 25)
                      remainder = remainder - 25
                      print*,remainder
                      q = q + 1       
              end do
              do while (remainder &gt;= 10)
                      remainder = remainder - 25
                      print*,remainder
                      d = d + 1       
              end do
              do while (remainder &gt;= 5)
                      remainder = remainder - 25
                      print*,remainder
                      n = n + 1       
              end do
              do while (remainder &gt;= 1)
                      remainder = remainder - 25
                      print*,remainder
                      p = p + 1       
              end do 
  
              print*, "# Quarters:", q
              print*, "# Dimes:", d
              print*, "# Nickels:", n
              print*, "# Pennies:", p
  
      end program change
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code> 47
        22
        -3
  # Quarters:           1
  # Dimes:           1
  # Nickels:           0
  # Pennies:           0
  </code></pre>
  
  <p>The first loop (>=25) should exit once the remainder becomes 22, but it runs through once more and yields a negative number. Why is this not exiting even though the condition is false? I'm using IDEone.com's Fortran "compiler" which appears to be Fortran 95-like.</p>