find compound interest rate equation code example Example: compound interest formula A = P(1+(r/n))^(n*t)