Calculate the sum of all even numbers between 1 and a given positive integer n. Write a function that takes n as input and returns the sum of even numbers.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers16
Suggested Problems
-
Count from 0 to N^M in base N.
241 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
560 Solvers
-
Return unique values without sorting
1024 Solvers
-
261 Solvers
-
Unique values without using UNIQUE function
455 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Additional test cases have been added.