필터 지우기
필터 지우기

I think my answer is not correct for this question, anyone can help me to check it? Thanks

조회 수: 1 (최근 30일)
Attached file is the question. Here is my code
B = 10000;
m = 0;
P = input('monthly payment?')
while B>0
B=B*(1.005);
B=B-P
m=m+1
end

채택된 답변

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2015년 6월 27일
Hi,
It matches with your flowchart, Why do you thing it is not correct?
  댓글 수: 4

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2015년 6월 27일
B = 10000;
m = 0;
P = input('monthly payment?')
while B>0
B=B*(1.005);
B=B-P; %changed
m=m+1; %changed
end
disp(m); %changed

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by