using a for loop

1 回表示 (過去 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 Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by