how can i convert this
n=5;fact = 1 ;
for i = 1:n
fact =fact * i;
end;
disp(fact)
into while loop
with my best regards

 채택된 답변

KSSV
KSSV 2020년 4월 7일
편집: darova 2020년 4월 7일

0 개 추천

i = 1 ;
f = 1 ;
n = 3 ;
while i<=n
f=f*i;
i = i+1 ;
end

댓글 수: 6

Mohammed Bokhow
Mohammed Bokhow 2020년 4월 7일
Sir KSSV You didn't answer me correctly
Mohammed Bokhow
Mohammed Bokhow 2020년 4월 7일
did you read my qusetion carefully?
Mohammed Bokhow
Mohammed Bokhow 2020년 4월 7일
how can i convert this
n=5;fact = 1 ;
for i = 1:n
fact =fact * i;
end;
disp(fact)
into while loop
with my best regards
Mohammed Bokhow
Mohammed Bokhow 2020년 4월 7일
this was my question
KSSV
KSSV 2020년 4월 7일
I gave you the answer.......you need to change the variables accoridng to yours thats it...
Mohammed Bokhow
Mohammed Bokhow 2020년 4월 7일
ok how can i change them i'm bignner at using matlab

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

질문:

2020년 4월 7일

편집:

2020년 4월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by