01 // PROJECT AT A GLANCE
TREE
CDrawing a fir tree in characters, whose shape depends on a single size parameter.
A day-4 pool exercise, decorative in appearance and in fact very geometric: you have to find the formulas that, from a single number, determine the width of each tier, the offset needed to centre the figure and the size of the trunk. The kind of exercise where you spend more time on a sheet of paper than at the keyboard.
A tree(int size) function printing an ASCII fir tree tier by tier, computing indentations and handling even and odd sizes differently.
PRIMARYC
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
03 // KEY OUTCOMES
- Finding the alignment formulas of a centred pattern from a single parameter
- A trunk whose width depends on the parity of the size, to be handled separately
04 // SOURCE TREE
READING SOURCE…