2 issues that are poping out at me
1 when you break even, your still returning double money because you misplaced where the money doubling is
2 you should be using floor, not int to do the rounding, int will convert things like 1.6 to 2, where floor will convert 1.6 to 1 as it should be
|