100-days-of-rust/Week-07/Day-48_Christmas-Tree/README.md
2023-03-23 21:14:34 -04:00

25 lines
272 B
Markdown

# Christmas Tree
Write a function to create a Christmas tree based on height **h**.
## Examples
```text
tree(1) ➞ [
"#"
]
tree(2) ➞ [
" # ",
"###"
]
tree(5) ➞ [
" # ",
" ### ",
" ##### ",
" ####### ",
"#########"
]
tree(0) ➞ []
```