about | help | code help+videos | done | prefs |
Given an integer and a boolean, round the integer up to the next highest multiple of 10 if the boolean is true. If the boolean is false, round the integer down to the next lowest multiple of 10. If the integer is a multiple of 10, simply return that number. upOrDown(18, true) → 20 upOrDown(18, false) → 10 upOrDown(-18, true) → -10 ...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: 250 Post-solution available
Copyright Nick Parlante 2017 - privacy