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

 

centsToDollars


Given an amount of pennies, return the value as dollars and cents. Do not worry if there are no trailing zeros (i.e. 2.1 for $2.10)


centsToDollars(37) → 0.37
centsToDollars(168) → 1.68
centsToDollars(10) → 0.1

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

public double centsToDollars(int pennies) { }

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

Copyright Nick Parlante 2017 - privacy