our output should look like this (the underscores are just there to make it display properly):

This program will output a parallelogram.
How long do you want each side to be? 9
Please enter the character you want it to be made of: *
*
**
***
****
*****
******
*******
********
*********
_********
__*******
___******
____*****
_____****
______***
_______**
________*



i'm almost done but i'm having a problem with getting the bottom half to indent properly. here is the code i have for it:

Code:
for (int row = length - 1; row >= 1; row--)

  {

    for (int col = 1; col <= row; col++)

    {

      cout << setw(1 + length - row) << displayChar;

    } 

    cout << "\n";

  }
i tried putting in length and row for setw but they shift too far to the right. the equation that's in there now is something a tutor suggested to me but it's not working either. could anyone help me? thanks!