Capital One Interview Question

How would you program a coin calculator?