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
-
3617 Solvers
-
776 Solvers
-
660 Solvers
-
636 Solvers
-
Is this triangle right-angled?
5968 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!