title: Using a single function recursively to display a triangle with a minimum and maximum value
body: <p>This is a simple homework question, but I've been unable to solve it and honestly am wondering if it's even possible within the parameters that have been set.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  void triangle(int m, int n);
  void drawline(char symbol, int len);
  
  int main() {
      triangle(3,5);
      return 0;
  }
  // -----------------------------------------------------------------------------
  void triangle(int m, int n) {
      // use recursion to complete this function
  }
  // -----------------------------------------------------------------------------
  void drawline(char symbol, int len) {
      for (int i=0; i&lt;len; i++)
          cout &lt;&lt; symbol;
      cout &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Once the recursion function is completed, the code above should return this.</p>
  
  <pre><code>***
  ****
  *****
  ****
  ***
  </code></pre>
  
  <p>I can make it up to the fifth star on line 3, but iterating backwards and stopping at three stars is throwing me for a loop. I need to have some type of value that stays at m's initial value and the same for n. I can't figure this out without changing m, and if I change m then I have lost my terminating point. I don't know if there is some strange math trick I should be doing with m and n, or if this is just something simple and I'm missing it.</p>
  
  <p>If the triangle started at 0 every time, then this would be cake. It's keeping the minimum point that is throwing me for a loop. I'm not asking for the answer, but just a confirmation that this is possible without doing something hacky and a nudge in the right direction would be nice.</p>
  
  <p>**I have searched all over and all I have found is triangles that either always start at 0, or they use a function for the first half of the triangle and another for the second.</p>