Example 6: Solve the Denomination Problem

Learn how to use arithmetic operations to solve real life denomination problems.

Problem

Consider a currency system in which there are bills of seven denominations: $1, $2, $5, $10, $50, and $100.

Write a program that takes $N amount as a parameter and computes the minimum number of bills required, which sum up to $N.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.