title: I can't make my while loop stop when I want
body: <p>Write a while loop that prints <code>userNum</code> divided by 2 (integer division) until reaching 1. Follow each number by a space. Example output for <code>userNum</code> = 20: <code>20 10 5 2 1</code></p>
  <pre class="lang-cpp prettyprint-override"><code>    #include &lt;iostream&gt; 
      using namespace std;
      
      int main() 
      {    
         int userNum = 0;
      
         userNum = 20;    
         cout &lt;&lt; userNum &lt;&lt; &quot; &quot;;
         while (userNum &gt; 1)    
         {
            userNum = userNum/2;
            cout &lt;&lt; userNum &lt;&lt; &quot; &quot;;    
         }    
         cout &lt;&lt; endl;
      
         return 0; 
      }
  </code></pre>
  <p>It divides properly until I get to 0, where it gives me 0 instead of terminating. What am I doing wrong?</p>
  <p>Thanks!</p>