Given n, find the sum of first n positive integers
Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers622
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1991 Solvers
-
Determine the number of odd integers in a vector
824 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1260 Solvers
-
272 Solvers
-
Find out sum of all elements of given Matrix
533 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
remove %% comment line for assertion code