This solution is outdated. To rescore this solution, sign in.
-
1 Comment
Dale Crawford
on 7 Dec 2015
I think this works for very low numbers but as you get higher, a work around that might be faster is
n*(n+1)/2
Suggested Problems
-
17681 Solvers
-
Maximum running product for a string of numbers
2198 Solvers
-
1680 Solvers
-
Who knows the last digit of pi?
672 Solvers
-
calculate the length of matrix
1917 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!