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

 

minCents


Return the least number of cents that we can carry around for having n dollars. For instance: if n = 10.11$, the minimum number of cents would be 1.


minCents(1.01) → 1
minCents(200.0) → 0
minCents(0.0) → 0

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

public int minCents(double n) { }

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: 160

Copyright Nick Parlante 2017 - privacy