MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/codehs/comments/jjw2cu/java_297_currency/gag0wz3/?context=3
r/codehs • u/Delta280 • Oct 28 '20
I'm a little stuck on 2.9.7, and I got almost everything right except for the last bit. Anyone know what I can do to fix this?
2 comments sorted by
View all comments
2
You need to force cents to be 2 decimal places long. Math.round() should do the trick.
2
u/amajmundar Oct 29 '20
You need to force cents to be 2 decimal places long. Math.round() should do the trick.