title: Multiplication table using recursion without loops
body: <p>I've received an assignment to write a recursive function that receives two integersd from the user: <code>x</code> and <code>y</code> and  prints out the multiplication table up to the number <code>x*y</code>.
  the prototyping of the function must be exactly like: <code>void mult_table (int x, int base, int y)</code> 
  (<code>base</code> gets <code>1</code> upon the first time that the function is called).
  for example, if <code>x=4</code> and <code>y=5</code>, the output will be: </p>
  
  <pre><code>1 2 3 4 5
  2 4 6 8 10
  3 6 9 12 15
  4 8 12 16 20
  </code></pre>
  
  <p>note that no loop can be used inside the function, but additional recursive functions can be used if needed.</p>
  
  <p>my problems are:
   1. how to iterate base correctly in lines 2 and greater, because in line 1 simple ++ works, but for the second line i already need 
   2. that I can't think about a stopping case for the function, because each time that I'm about to print a new line the <code>x</code> and <code>y</code> values are changed.
  I would be very grateful for any help, even suggestions of other ways to try and do it.</p>
  
  <pre><code>void mult_table (int x, int base, int y)
  {
      int temp; //temp variable to hold x vlaue
      if (base &lt;= y) //as long as base is less or equal to y, a number of line will be printed
      {
          printf(" %d", base); //using base with +1 incrementation
          mult_table(x, base+1, y);
      }
      else
      {
          printf("\n"); //start of a new line
          temp = x; //value of x is saved because it will be changed but it is still needed
          x= x+x*(1/(base-temp-1)); //new x value x+(x*1/original base of line) to reach the next x value
          y = y+y*(1/(base-temp-1)); //new y value y+(y*1/original base of line) to reach the next x value
          base = base - temp; //base is incrimented by 1 using this calcualtion
          mult_table(x, base, y); //recursdive call
      }
  }
  </code></pre>