This challenge seems a little silly...
this solution is silly. I think the challenge requires you to write you to write your own code, not use matlab's function
how this %nothing gives the solution ??
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 1;
t = 1;
assert(isequal(factorial(n),t))
|
2 | Pass |
%%
n = 2;
t = 2;
assert(isequal(factorial(n),t))
|
3 | Pass |
%%
n = 3;
t = 6;
assert(isequal(factorial (n),t))
|
4 | Pass |
%%
n = 6;
t = 720;
|
Back to basics 13 - Input variables
233 Solvers
Number of digits in an integer
336 Solvers
360 Solvers
191 Solvers
555 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!