← Back

Code Challenge 1.7 - Change Calculator


Objective

Your task is to write a program that helps novice cashiers give back the correct change efficiently. The program should start with the largest coin denomination and work its way down until the exact change is given.

Example: If a cashier needs to return 55 cents, your program should display: two quarters and one nickel. While there are other combinations, this method ensures efficiency.

Skills to Practice

Challenge Tasks

Sample Output

Enter the amount of change needed (in cents): 68 [Enter]
You will need:
2 quarters
1 dime
1 nickel
3 pennies