about | help | code help+videos | done | prefs |
roundedOff
In an imaginary economy, all amounts get rounded off to the nearest multiple of 100. Define a function that when passed an integer representing an amount, returns the rounded-off amount. Note: Brownie points if you do it without any condition :) roundedOff(199) → 200 roundedOff(150) → 200 roundedOff(149) → 100 ...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: 2 Post-solution available
Copyright Nick Parlante 2017 - privacy