title: Parallelogram in C++ Using While or Do/While
body: <p>I have an assignment requiring a program that creates a parallelogram of a specific size and makeup. I need to use at least one for loop and one while or do/while loop. So far, I've created a program that does this:</p>
  
  <pre><code>Enter the symbol to use to draw your parallelogram: 
  +
  Enter the number of symbols to use for each side: 
  5
  
  +
  ++
  +++
  ++++
  +++++
  ++++
  +++
  ++
  +
  </code></pre>
  
  <p>Great, but not a parallelogram. It should do this:</p>
  
  <pre><code>+
  ++
  +++
  ++++
  +++++
  +++++
  +++++
  +++++
  +++++
  _++++
  __+++
  ___++
  ____+
  </code></pre>
  
  <p>Ignore the underscores- I was just using them to create spaces.  </p>
  
  <p>I think I need to create a while or do/while loop that says, "Once you've gotten to the specified number (in the above case, 5), print that row 5 times." Then I need to create another for loop that says, "Once you've done that while or do/while loop, start subtracting characters from the left side until you get back to one."
  Can someone give me an idea of how to do this or even if this idea is a good one? My current code is below. The //while (row=length) bit is my started attempt at a while, which is why I have it as a comment right now. Thank you in advance!</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  
  int main () {
      int length;
      char symb;
  
      cout &lt;&lt;"Enter the symbol to use to draw your parallelogram: "&lt;&lt;     endl;
      cin &gt;&gt; symb;
      cout &lt;&lt;"Enter the number of symbols to use for each side: "&lt;&lt; endl;
      cin &gt;&gt; length;
  
      int row, col;
      for (row=0; row&lt;=length; row++) //Up and over row
      {
          for (col=0; col&lt;=row; col++) //Up and over column
              cout &lt;&lt; symb;
          cout &lt;&lt; endl;
      }
      //while (row=length)
      //{
  
  
      for (row=length; row&gt;=1; row--) //Down and over row
      {
          for (col=row; col&gt;=1; col--) //Down and over column
              cout &lt;&lt; symb;
          cout &lt;&lt; endl;
      }
  
  
  }
  </code></pre>