using a for loop

조회 수: 12 (최근 30일)
Ravi Jayasuriya
Ravi Jayasuriya 2020년 3월 14일
댓글: Ravi Jayasuriya 2020년 3월 14일
Write a small programme, using a for loop and the disp() command, to display the value of the loop variable each time you go through the loop, where the loop variable goes from 5 to 17 inclusive.
any help :(
i'm new to matlab and to all this.
  댓글 수: 3
Ravi Jayasuriya
Ravi Jayasuriya 2020년 3월 14일
yes, i think i got it.. heheh
for x= 5:17;
disp(factorial(x));
end
Ravi Jayasuriya
Ravi Jayasuriya 2020년 3월 14일
thanks for help.

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

답변 (0개)

카테고리

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