Question
One bank pays 5.5 percent annual interest, while a second bank pays
4.5 percent annual interest. Determine how much longer it will take to
accumulate at least $50 000 in the second bank account if you deposit
$1000 initially and $1000 at the end of each year.
need help writing a script for matlab using the for,while loops.
this is what i have so far but its not giving me anything.
r2=.045;
P=1000;
n=1;
count=0
for t=0:99
A=P(1+r2/n)^(nt);
if A<50000
A=P(1+r2/n)^nt;
count=t
end
end
disp(count)
4.5 percent annual interest. Determine how much longer it will take to
accumulate at least $50 000 in the second bank account if you deposit
$1000 initially and $1000 at the end of each year.
need help writing a script for matlab using the for,while loops.
this is what i have so far but its not giving me anything.
r2=.045;
P=1000;
n=1;
count=0
for t=0:99
A=P(1+r2/n)^(nt);
if A<50000
A=P(1+r2/n)^nt;
count=t
end
end
disp(count)
Answers
amount= 1000;
k=0;
while amount < 50000
k=k+1;
amount =amount*1.045 +1000;
end
amount
k
amount = 5.0711e+004
k = 26
this is the correct answer
k=0;
while amount < 50000
k=k+1;
amount =amount*1.045 +1000;
end
amount
k
amount = 5.0711e+004
k = 26
this is the correct answer
Related Questions
A person deposits $1000 in a bank account which pays 8% annual interest compounded
continuously.
U...
Jon invested a total of $40,000 in 3 different bank accounts. One pays an annual interest rate of 3%...
First bank pays 7 percent simple interest on its investment accounts. If second bank pays interest o...
Bank A pays 5% simple interest on its deposit account, whereas Bank B pays interest on its deposit a...