title: Find the square of a number using recursion with one parameter function
body: <p>Below is a (trivial) C++ function which returns the square of its parameter (a non-negative integer):</p>
  
  <pre><code>unsigned int square(unsigned int n) {
      return n*n;
  }
  </code></pre>
  
  <p>Your job:  write a function which also returns n<sup>2</sup> but with the following constraints:</p>
  
  <ul>
  <li>You cannot use the multiplication operator <code>*</code></li>
  <li>You cannot use the division operator <code>/</code></li>
  <li>You cannot have any loops</li>
  <li>You cannot add any additional parameters to the function</li>
  <li>Your function must be self-contained:  no helper functions!</li>
  <li>You cannot use any globals</li>
  <li>You cannot use any static variables</li>
  <li>You cannot use any "bit twiddling" operations -- no shifts, etc.</li>
  </ul>
  
  <p>However, …</p>
  
  <ul>
  <li>You can use recursion</li>
  <li>You can use the <code>+</code> and <code>-</code> operators.</li>
  </ul>
  
  <p>So far I have tried getting the square using the n(n+n+n+...), but for that I need something that keeps track of the recursive cycle, but because the function can only have one parameter I need another way to tackle this problem.</p>