Hi im trying to output a Christmas tree when the user inputs the size of the tree. However my program only prints half of the tree like this:
Enter the size of the tree (4-20): 5
#
###
#####
1 2 3 4 5 6 7 8 9
|
void drawABranch(int& branchLine) //draw one line of foliage
{
for (int i = 0; i < branchLine * 2 - 1; i++)
{
cout << LEAF;
}
cout << EOL;
++branchLine;
}
|
Any help/advice given will be greatly appreciated thanks!
Last edited on
its the depth of the tree, but the bottom 2 lines of the tree will be the tree trunk which I will use "!" for
Yes it should look like that however it only displays half of the tree