Calculate the sum of first x natural numbers - MATLAB Cody - MATLAB Central

Problem 58543. Calculate the sum of first x natural numbers

Difficulty:Rate
Calculate the sum of first x natural numbers
for example if n=10 output =1+2+..+10=55

Solution Stats

88.89% Correct | 11.11% Incorrect
Last Solution submitted on Apr 24, 2024

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers15

Suggested Problems

Problem Tags

sum

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page