For an input array, add all the even values and subtract the odd values. This final value is the output.
E.g.
input = [1 2 3 4 5]
output = -3
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers32
Suggested Problems
-
Project Euler: Problem 7, Nth prime
1779 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1330 Solvers
-
1431 Solvers
-
The Answer to Life, the Universe, and Everything
588 Solvers
-
Solve a System of Linear Equations
14939 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!