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
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
find whether it is prime or not
151 Solvers
-
Given a square and a circle, please decide whether the square covers more area.
1302 Solvers
-
Find the max element of the array
1795 Solvers
-
Calculate the average value of the elements in the array
1381 Solvers
-
2437 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!