about | help | code help+videos | done | prefs |
fund_roundNearest
Given a decimal number, return that number rounded to the nearest whole number. The Math class method Math.round(___) returns a long, which is a whole number like int, except that it is 64-bits of storage instead of 32-bits. Typecast the answer from Math.round(___) to an int before returning it! fund_roundNearest(1.1) → 1 fund_roundNearest(1.5) → 2 fund_roundNearest(1.7) → 2 ...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