using a for loop

12 次查看(过去 30 天)
Ravi Jayasuriya
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