CPTR 124 Fundamentals of Programming

Redesign Listing 6.15 (startree.cpp) so that it draws a sideways tree pointing right; for example, if the user enters 7, the program would print

*
**
***
****
*****
******
*******
******
*****
****
***
**
*

If the user enters 4, the program would print

*
**
***
****
***
**
*

If the user enters 1, the program would print

*

If the user enters 2, the program would print

*
**
*