Okay, so you can't use ifs, that means you have to use integer arithmetic.
Think of it this way: if you need to give $1.52 in quarters, dimes, nickels and pennies, one way to do it would be to take .25 at a time out of that sum until there was less than a quarter. After that, you can take dimes until you're under a dime, then you take as many nickels as you can, then you give one penny at a time.
Looking at your post above - don't try to do this with Strings. Make yourself an integer. $5.26 is 526 cents, do your calculation on that integer value. It'll be much easier to deal with. (you can modify the procedure I outlined to deal with dollars pretty easily as well)
Have fun, come back with your code or on it.
This is an inefficient procedure, but I think you can probably write it easily enough, and without any ifs (or ands or buts, for that matter!)
Once you've written that, we can talk about improving it.
By the way, if you do need to convert:
Most primitives have a wrapper-class toString() method. int->String: Integer.toString(i); Most primitives also have a conversion from String method as well. String->int: Integer.parseInt(i); Therefore, for something like char to int: Integer.parseInt(Character.toString(c));
Cool. The fact that you worked out the division part from what you were given is pretty good, it shows that you're thinking about what you're doing. Good work.
You should probably take a little time to look at floating point arithmetic at some stage. Floating point representation in computers is necessarily inexact, and you might run into trouble with comparison of values. It's possible, for example, that two values which should be equal will differ somewhere out in the godknows-th decimal place - and then they won't be equal. For discrete quantities like money, it's usually best to use ints, to avoid these errors.