Create a program which can be run in the terminal that displays a Christmas Tree.
The program was built using C language
The challenges were to figure out right formulas that will let you build proportional trees of any size. While there is a pattern, it was not straightforward. There were a lot of disformed trees at the beginning:
Run command "make" in the terminal. It will build the target file "my_tree"
make
To run the program type in "./my_tree" and the size of the tree.
If none or invalid size is given the program termminates.
The size is limited to 15 tiers to look nice in the terminal and avoid overflows.
(The tallest tree is 116 metres in Redwood National Park in California, USA. And we are not competing with it.)
./my_tree 3
Discovering ANSI escape codes to show colours was a game changer!
The step up will be to add tree ornaments and some snow!
Made at Qwasar Silicon Valley