MATLAB Cody - MATLAB Central

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 ).

Difficulty:Rate

Solution 14002731

Submitted on 19 Jun 2024 by Binbin Qi
This solution is locked. To view this solution, you need to solve the problem first.

Suggested Problems

Community Treasure Hunt

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

Start Hunting!
Go to top of page