Make Change


Collapse Content

There are four types of common coins in US currency: quarters (25 cents), dimes (10), nickels (5) and pennies (1). There are 6 ways to make change for 15 cents:

  1. A dime and a nickel;
  2. A dime and 5 pennies;
  3. 3 nickels;
  4. 2 nickels and 5 pennies;
  5. A nickel and 10 pennies;
  6. 15 pennies.

How many ways are there to make change for C cents using these common coins?

Input/Output
You will be given N the number of cases. N lines follow, which each contain a single integer C, the number of cents. Print out the number of ways to make change of C cents.

Challenge

How many ways are there to make change for C cents using these common coins?

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Contact Us
Sign in or email us at [email protected]