I have been assigned to write a program which accepts a certain amount of money in standard form such as "7.53" and echo it as " You have entered 7 dollars and 53 cents", Then before any calculations I am supposed to convert that into an integer amount of cents (753). I wrote this program (shown below) but it only accepts an whole number as my input. What should I do to accept decimals and output successfully as integers?

Sorry I'm new to this posting threads stuff, I posted the previous threads without actually looking at the announcements for beginners, and I thought this one is more easier to read for viewers.

October 2nd, 2013, 08:55 PM

Kewish

Re: How to input a decimal via JOptionPane and echo it as a Integer

Okay, you're finding your feet. Try and pick up forum etiquette quickly. Not replying to people that take the time to review and respond to your thread comes across as poor etiquette.

In regards to your problem, you say that you cannot take floating point inputs.
Why do you think that is?
What data type are you parsing after input?
What happens when you change that input type to the appropriate one?
Can you manipulate that value using math to make that floating point input represent the integer value you are after? Ie, how do you make 7.53 = 753?