about | help | code help+videos | done | prefs |
There's a sale at the local Pencil store. Each pencil cost $2 but you can get 4 for only $7. Given the number of pencils, this method returns the total cost of those pencils. pencils(3) → 6 pencils(11) → 20 pencils(-2) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy