function to draw a diamond

I need to do this.

Finally, you will draw the diamond using a programmer-defined function that accepts both the integer and the printable character entered by the user as parameters. The integer entered by the user will specify the number of rows in the diamond. You may only use cout statements that print a single character (i.e., that passed in by the user), a single space, or a single new-line character (such as ā€˜\nā€™ or endl). Maximize your use of repetition with nested for loops and minimize the number of cout statements. This function should be a void- function that does not return a value. It should print a diamond of the appropriate size using the printable character entered by the user.

I have this so far for the function definition.
I have already done all the code to get the row amount and the character to use.
For example, if they enter * and row amount of 5, it should draw
--*
-***
*****
-***
--*

- is just a blank or space

1
2
3
4
  void DrawADiamond(int RowAmount, char DrawChar)
{

}
Please, do not double posts... twice :-)
http://www.cplusplus.com/forum/beginner/209967/
Topic archived. No new replies allowed.