Write a for loop that will compute (as its only output) each of the following finite sum. Run it and give the answer (= the output).
(a) Suppose that Randall sets up a 401(k) retirement annuity that pays r = 6% interest, compounded annually. When he turns 35 years old, Randall deposits $3500, and each subsequent year he plans to deposit 5% more than the previous year (due to planned raises and better money management). He continues this until his 65th birthday (when he makes his last deposit and plans to retire). How much will Randall’s annuity be worth then?
Balance = 3500;n = 30;r = .06;t = 1;Balance_vec = zeros(1,n);for i = t:n Interest_Balance = Balance*(1+r).^i; New_Balance = Balance+Balance*0.05;enddisp(New_Balance);
Best Answer