Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

6. (5 points) Suppose you can get an annual interest rate(as a decimal). You wan

ID: 2254499 • Letter: 6

Question

6. (5 points) Suppose you can get an annual interest rate(as a decimal). You want to save S dollars over N years. You will need to make a monthly deposit of

Emily can afford to save $90 per month. What interest rate will she need in order to have $10,500 in 7 years? Start with an interest rate of r= 0.01 (too low). Use while loop to increase the rate by 0.001 until the desired output is reached. Your code may look cleaner if you define M as an anonymous function before the while loop.

(1 +r/12)V -1

Explanation / Answer

Solution

S = 90;

r = 0.01;
N = 7;
M=0;
while M<= 10500
M =S*((r/12)/(((1+r/12)^(12*N))-1));
r=r+0.001;

endwhile

fprintf("%f",r);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote