Write an algorithm to settle the following question: A bank account starts out with $10,000. Interest is compounded monthly at 6 percent per year (0.5 percent per month). Every month, $500 is withdrawn to meet college expenses. After how many years is the account depleted? 

Write a pseudo code for the formula ($10,000(1.005)^12t) – ($500^12t)

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now