Problem 1749. Factorial !
Solution Stats
Problem Comments
-
4 Comments
I dont understand what you wanted to do with your test no.4. why dont you just check our answer against the actual factorial, instead of hard coding (truncated) numbers?
testcase is nok:
6.6895e+198==factorial(120)
ans =
0
Use if statement for test 4...
Faulty test case has been corrected. Those who have solved with respect to the rounded test case kindly solve the question again. It's a fairly simple one!
Solution Comments
Show commentsProblem Recent Solvers119
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15530 Solvers
-
Back to basics 4 - Search Path
367 Solvers
-
Given a matrix, return the last eigen value
221 Solvers
-
347 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
378 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!