Calculate the sum of first x natural numbers
for example if n=10 output =1+2+..+10=55
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers16
Suggested Problems
-
Project Euler: Problem 1, Multiples of 3 and 5
3665 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2535 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
13597 Solvers
-
371 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!