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

Solution 14362244

Submitted on 18 Oct 2024 by Tomoaki Takagi
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