Write a compound interest function to model each situation. Then find the balance after the given number of years.

$50,000 invested at a rate of 3% compounded monthly; 6 years

$43,000 invested at a rate of 5% compounded annually; 3 years

$65,000 invested at a rate of 6% compounded quarterly; 12 years​