title: C decimal to binary without arrays
body: <p>I think I've almost got it, but I feel like I'm go in circles trying to figure this out.
  The challenge to out cout without using strings or arrays. I took the number 56 as an example and 56 should equal 111000 this is not the case as it goes through fine till 7 then the number equals number*2 + number%2 makes it equal to 15 and outputs all 1's. Idk anymore, this is driving me to the moon and back.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
  int number = 0;
  int n = 1;
  int x = n;
  cin&gt;&gt;number;
  cout&lt;&lt;n%2;
  while(n &lt;= number)
  {
      if(n%2 == 0)
      {
          n = n*2;
          cout&lt;&lt;0;
      }
      else
      {
          n = n*2 + n%2;
          cout&lt;&lt;n%2;
      }
  }
  }
  </code></pre>