Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

extra credit in class but stuck on persentage rates  RSS feed

 
Chris Burkovich
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in doing the program investment calculator my rates are not working I tried this
 
Hunter McMillen
Ranch Hand
Posts: 492
Firefox Browser Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The number you are trying to parse is 5.9; but you are using Integer.parseInt(). That is why an error is getting thrown.

-Hunter
 
Chris Burkovich
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes I saw that after I posted last night and changed from
Integer to Double.parse.Double() and now all percentage rate applies
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!