Kotlinlearncs.online LogoJava
Return to List

Solve: Array Sum Even (One Dimensional)

Created By: Geoffrey Challen
/ Version: 2021.2.0

Declare and implement a function called arrayEvenSum that receives a one-dimensional array of int values as its only parameter and returns the sum of the even values in the array as an int. As a reminder, you can test whether an int is even using the remainder operator (%). If the array is null you should return 0.

Related Lessons

Stuck? You may find these lessons helpful: