id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

fund_roundDown


Given a decimal number, round it down to the whole number below it. For example, 3.8 would be rounded down to 3.0. The Math class method Math.floor(___) always rounds down. Note: Math.floor returns a double.


fund_roundDown(1.1) → 1.0
fund_roundDown(1.5) → 1.0
fund_roundDown(1.7) → 1.0

...Save, Compile, Run (ctrl-enter)

public double fund_roundDown(double x) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy