id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

addEven


Write a method that returns the sum of the EVEN elements in the input array of integers.


addEven([5, 3, 6, 7, 11, 2, 15]) → 8
addEven([2, 6, 4, 2, 0, -12]) → 2
addEven([5, 8, 8, 4, -7, 3, -15, 91]) → 20

...Save, Compile, Run (ctrl-enter)

public int addEven(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 210

Copyright Nick Parlante 2017 - privacy