Write a function count = count_evens(vec) that takes a 1D array (vector) of numbers vec and returns the total count of even numbers in it.
An even number is any integer that is divisible by 2 with no remainder (i.e., rem(x, 2) == 0).
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers7
Suggested Problems
-
7 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!