title: Recursion and multiplication
body: <p>Is this possible guys? This is homework I have, and my teacher obviously believes it is, but it seems to me that it's impossible not to use addition or multiplication outside of the short-multiplication method. </p>
  
  <blockquote>
    <p>Write  (and provide a tester for) a recursive algorithm:</p>
    
    <p>int multiply(int x, int y)</p>
    
    <p>to multiply two positive integers together without using the *
    operator. Do not just add x to itself y times!!!</p>
    
    <p>(Hint: Write a recursive method that will multiply an integer by a
    value in the range 0 .. 10. Then write a second recursive method to
    implement the multiplication algorithm you learned to multiply
    multi-digit numbers in elementary school.)</p>
  </blockquote>
  
  <p>My issue is that once you break down any multi digit number and starting adding those together you have to use multiplication of numbers greater than 10, i.e 22 * 6 is 2 * 6 + 20 * 6 ... so am I totally missing something?</p>
  
  <p><strong>EDIT</strong>
  I guess I should have added this is the code I have, </p>
  
  <pre><code>public int mult(int x, int y){
  return x == 0 ? 0 : (mult(x-1, y) + y);
  }
  </code></pre>
  
  <p>which is perfect, but as far as I understand the instructions, that's breaking do not just add x to itself y times. I personally believe it isn't, but my teacher hasn't been very clear, and I'd like to know if there's some other way that I havn't thought of, sorry for the confusion.</p>