Filter löschen
Filter löschen

Interest calculation with while

3 Ansichten (letzte 30 Tage)
Tony Jacob
Tony Jacob am 29 Sep. 2016
Kommentiert: Walter Roberson am 3 Okt. 2016
I have no idea where to start for this problem, any help would be appreciated.
Use a while loop to determine how many months it will take to accumulate $1.5 million in your retirement account under the following conditions: initial deposit = $1,000, interest is 0.5%, per month and you pay $750 into the account each month.

Antworten (1)

Rani V.S
Rani V.S am 3 Okt. 2016
Bearbeitet: Rani V.S am 3 Okt. 2016
sum=1000
month=0
while sum<1500000
sum=(sum+750)*1.5
month=month+1
end
disp(month)
  1 Kommentar
Walter Roberson
Walter Roberson am 3 Okt. 2016
That would be 50% interest per month, not 1/2 % interest per month.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by