A student decides to finance their college education using a credit card. They charge one semester's tuition and then make the minimum monthly payment until the credit card balance is zero. How many months will it take to pay off the semester's tuition? How much will the student have spent to pay off the tuition?
We can solve this problem using an m-file script. We define the following variables:
bn - Balance at month n.
Pn - Payment in month n.
fn - Finance charge (interest) in month n.
Credit card interest rates are typically given as an annual percentage rate (APR). To convert the APR to a monthly interest rate, use the following formula:
More information on how to compute monthly rates can be found at the Wikipedia article "Credit card interest" http://en.wikipedia.org/wiki/Credit_card_interest
Place the code developed for Exercise 7 into a while loop to determine how many months will be required to pay off the card.
Modify your code from Exercise 8 to plot the monthly balance, monthly payment, and total cost-to-date for each month until the card is paid off.