// Java code // rounding to nearest nickel with long to store currency in pennies. // 1.40 1.41 1.42 -> 1.40 // 1.43 1.44 1.45 1.46 1.47 -> 1.45 // 1.48 1.49 1.50 -> 1.50 long rounded = ( ( amountInPennies + 2 ) / 5 ) * 5; // rounding down to the nickel with long to store currency in pennies. long rounddown = amountInPennies / 5 * 5; // rounding up to the nickel with long to store currency in pennies. long rounddown = ( ( amountInPennies + 4 ) / 5 ) * 5;