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

 

andersoniii.edwin@cusd80.com > arraySum
prev  |  next  |  chance

Write a static method arraySum that calculates and returns the sum of the entries in a specified one-dimensional array. The following example shows an array arr1 and the value returned by a call to arraySum. arr1 = {1,3,2,7,3) and the sum returned would be 16


arraySum([1, 3, 2, 7, 3]) → 16
arraySum([1, 1, 1, 1]) → 4
arraySum([9, 8, 7, 6, 5]) → 35

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

public int arraySum( int[] arr) }

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: 111

Copyright Nick Parlante 2017 - privacy