In: Computer Science
Use Matlab
If you borrow $20,000 and pay it off in 7 years with monthly compounding at 3% annual interest, the payment will be $264.27 per month.
clc
clear all
close all
r=0.03;
L=20000;
t=7*12;
M=L*(r/12)*((1+r/12)^t)/((1+r/12)^t-1);
fprintf('Monthly payment is $%.2f\n',M);