Practice · 1 of 5
Array sum
CHALLENGE
Difficulty: beginner+25 XP
Implement int sum(int[] arr): the total of all elements. Enhanced-for or indexed loop — your pick.
Press Submit to check your solution.
Back to lesson: Practice: Array reps
Practice · 1 of 5
Implement int sum(int[] arr): the total of all elements. Enhanced-for or indexed loop — your pick.
Back to lesson: Practice: Array reps