I have this homework which required to print asterick to make draw a triangle.
When drawTriangle(0);
*
When drawTriangle(1);
*
**
When drawTriangle(2);
*
**
* *
****
when drawTriangle(3);
*
**
* *
****
* *
** **
* * * *
********
when drawTriangle(4);
*
**
* *
****
* *
** **
* * * *
********
* *
** **
* * * *
**** ****
* * * *
** ** ** **
* * * * * * * *
****************
when drawTriangle(5);
*
**
* *
****
* *
** **
* * * *
********
* *
** **
* * * *
**** ****
* * * *
** ** ** **
* * * * * * * *
****************
* *
** **
* * * *
**** ****
* * * *
** ** ** **
* * * * * * * *
******** ********
* * * *
** ** ** **
* * * * * * * *
**** **** **** ****
* * * * * * * *
** ** ** ** ** ** ** **
* * * * * * * * * * * * * * * *
********************************
Any advice will be appreciated. Cheers.