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

 

frew@mclean.com unit7day3virtual > sumArray
prev  |  next  |  chance

Returns the sum of all the elements in the given array.


sumArray([2, 1, 2, 3, 4]) → 12
sumArray([2, 2, 0]) → 4
sumArray([1, 3, 5]) → 9

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

public int sumArray(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: 200

Copyright Nick Parlante 2017 - privacy