wes d2a2ba9e15 first commit 4 éve
..
README.md d2a2ba9e15 first commit 4 éve
code.cpp d2a2ba9e15 first commit 4 éve
unitTest.cpp d2a2ba9e15 first commit 4 éve

README.md

Christmas Tree

by Helen Yu tags: formatting, strings

Summary

Write a function to create a Christmas tree based on height h. Examples tree(1) ➞ [ "#" ] tree(2) ➞ [ " # ", "###" ] tree(5) ➞ [ " # ", " ### ", " ##### ", " ####### ", "#########" ] tree(0) ➞ [] Notes N/A

Instructions

Write a function to create a Christmas tree based on height h.

Examples

tree(1) ➞ [
  "#"
]

tree(2) ➞ [
  " # ",
  "###"
]

tree(5) ➞ [
  "    #    ",
  "   ###   ",
  "  #####  ",
  " ####### ",
  "#########"
]

tree(0) ➞ []

Notes

N/A