title: Multiplying using only recursive functions and incrementation in C
body: <p>So, for my assignment, I'm supposed to code a function that takes 2 unsigned arguments and outputs their product. </p>
  
  <pre><code>unsigned multiply( unsigned a, unsigned b );
  </code></pre>
  
  <p>For instance,</p>
  
  <pre><code>multiply(3, 4)
  </code></pre>
  
  <p>should return 12</p>
  
  <p>The thing is, I'm not allowed to use +, -, /, *, or % operators. I'm only allowed to call functions, and increment/decrement with ++ and --.</p>
  
  <p>I have another function already made to add 2 arguments:</p>
  
  <pre><code>unsigned add(unsigned a, unsigned b)
  {
      if (a &gt; 0)
          add(--a, ++b);
      else return(b);
  }
  </code></pre>
  
  <p>and I'm allowed to call this, along with any helper functions I need.</p>
  
  <p>I've spent the past 30 minutes trying out various permutations but I just cannot get the math right; the closest I've come is getting b to double itself a times, but that's not going to cut it. Any ideas?</p>
  
  <p>Edit: Forgot to mention! For/while loops aren't allowed either</p>