Problem 60526. Write a MATLAB function that takes a positive integer ( n ) as input and returns the sum of all the even numbers from 1 to ( n ).
Write a MATLAB function that takes a positive integer ( n ) as input and returns the sum of all the even numbers from 1 to ( n ).
Solution Stats
Problem Comments
-
2 Comments
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
27532 Solvers
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15530 Solvers
-
1899 Solvers
-
151 Solvers
-
1248 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!