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

 

jebbert@volusia.k12.fl.us > retestQuiz05272014convertToCents
prev  |  next  |  chance

Write a method that accepts 'cash' as a non-negative double representing how many dollars and cents are in your bank account. Note that you can have fractions of a cent. Return the total number of cents you have to the nearest cent. So round UP if you have a half a cent or more. Look at the test data for examples.


retestQuiz05272014convertToCents(1478.2) → 147820
retestQuiz05272014convertToCents(0) → 0
retestQuiz05272014convertToCents(421.24224) → 42124

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

public int retestQuiz05272014convertToCents(double cash) { }

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

Copyright Nick Parlante 2017 - privacy