Interest calculation with while

조회 수: 15 (최근 30일)
Tony Jacob
Tony Jacob 2016년 9월 29일
댓글: Walter Roberson 2016년 10월 3일
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.

답변 (1개)

Rani V.S
Rani V.S 2016년 10월 3일
편집: Rani V.S 2016년 10월 3일
sum=1000
month=0
while sum<1500000
sum=(sum+750)*1.5
month=month+1
end
disp(month)
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 10월 3일
That would be 50% interest per month, not 1/2 % interest per month.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by