title: What is wrong with this while-loop (C++)?
body: <p>I was pretty sure I was doing this the right way, but apparently I'm not. This while loops keeps running infinitely once it reaches 0. It keeps outputting "Monthly Payment: $0.00" and "Your loan after that payment is: $0.00" over and over again. What am I doing wrong?</p>
  
  <pre><code>while (loan_balance ! = 0)
    {
      monthly_payment = loan_balance / 20;
      loan_balance = loan_balance - monthly_payment;
  
      cout &lt;&lt; "Monthly Payment: $" &lt;&lt; monthly_payment &lt;&lt; ends;
      cout &lt;&lt; "Your loan balance after that payment is: $" &lt;&lt; loan_balance &lt;&lt; endl;
    }
  </code></pre>