Modulus division returning 1 less than it should [Answered]
when i assign change, its equal to 0.95. it should return 5, but this is returning 4? shouldnt it be returning 5?
public static int
CPCalculatePennies(double change)
{
double pennies = change % 5 % 1 % 0.25 % 0.1 % 0.05 / 0.01;
return (int)pennies;
}