We have learned many mathematical methods to solve counting problems. Some of these problems require a deep understanding of permutation and combination. In this chapter, we will learn examples of how to use programming to solve counting problems.
Example
Tickets on a bus were $4.00 and $6.00. A total of 45 tickets were sold and $230 was earned. How many $4.00 tickets were sold? (2007/MathIsCool problem at http://academicsarecool.com)
Answer