|
Using int/int, 7/5 would return 1
I'm programming in Java. I'm trying to make a program that inputs money (as a double) and determines the amount of different coins to give.
My problem is, I input a value as a double, and try to divide by a number to get the number of times it goes into that number, and get a remainer.
For example, using int/int, 7/5 would return 1.
But dividing double/double 7.0/5.0 returns an exact double. How to i get int "1" out of that?
Thanks.
|