about | help | code help+videos | done | prefs |
A parking garage costs $2 per hour or part of an hour, with a maximum charge of $12 for the day. Determine the cost for the parking given the time. Don't use any if statements or ternaries or loops. Your answer should be one line of code (return....). parkingCost(1) → 2 parkingCost(0.5) → 2 parkingCost(2.25) → 6 ...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: 200
Copyright Nick Parlante 2017 - privacy