Question: 5. (5 pt) Write a method, named countNickels that takes an int representing a number of cents as a parameter and returns the number of
5. (5 pt) Write a method, named countNickels that takes an int representing a number of cents as a parameter and returns the number of Nickels coins represented by that many cents. Don't count any whole dollars, because those would be dispensed as dollar bills. For example, countNickels(64) would return 12, because 12 nickels make 60 cents, with 4 extra left over. A call of countQuarters(1278) would return 15, because after the 12 dollars are taken out, 15 nickels remain in the 78 cents left
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
