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

 

andersoniii.edwin@cusd80.com week6 > roundOffWhole
prev  |  next  |  chance

Write the method that will round decimal numbers to the desired degree of accuracy. Create a method roundOffWhole that takes a "double" number (floating point) and an integer of accuracy (representing the whole number accuracy) and returns a integer value that represents the given double rounded. If 16.0 and 10 is entered - the result would be 20


roundOffWhole(16.0, 10) → 20
roundOffWhole(14.0, 10) → 10
roundOffWhole(99.0, 100) → 100

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

public int roundOffWhole(double number, int sigdig){ }

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

Difficulty: 100

Copyright Nick Parlante 2017 - privacy