wes d2a2ba9e15 first commit 4 gadi atpakaļ
..
README.md d2a2ba9e15 first commit 4 gadi atpakaļ
code.cpp d2a2ba9e15 first commit 4 gadi atpakaļ
unitTest.cpp d2a2ba9e15 first commit 4 gadi atpakaļ

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