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 13994531

Submitted on 17 Jun 2024 by Pauli Huusari
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