about | help | code help+videos | done | prefs |
treePrice
The price of trees is based on height. If a tree is 50cm or less, it costs 10 dollars. If the height is between 51cm and 100cm inclusive, the cost is 20 dollars. If the height is 101cm or greater the cost is 30 dollars. Unless it is your birthday -- on that day, all trees are discounted by 3 dollars. treePrice(40, false) → 10 treePrice(90, true) → 17 treePrice(200, false) → 30 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy