about | help | code help+videos | done | prefs |
stringToPennies
Given a String s that contains a dollar amount below $1,000, including the dollar sign ($), return the number of pennies needed to make up that value. stringToPennies("$5.95") → 595 stringToPennies("$0.32") → 32 stringToPennies("$99.00") → 9900 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 9 Post-solution available
Copyright Nick Parlante 2017 - privacy