I wanted to do a problem(math) in greenfoot with this code:
Unfortunately, when inputted with values of 40 and 100, it gives 0. Why is this happening?
Note: I tried this with a calculator. It gives 40
1 2 3 4 5 6 7 | public int getRemainder( int i, int i2) { double i3 = (i / i2); i3 = i3 * 100 ; int i33 = ( int ) i3; return i33; } |