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

 

jebbert@volusia.k12.fl.us > sumGreater10
prev  |  next  |  chance

Write a method that accepts an integer array as a parameter. The method returns the sum of all the elements in the array that are greater than 10. Any element that is less than or equal to 10 is not counted towards the sum.


sumGreater10([5, 6, 3, 12, -7, 0, 18]) → 30
sumGreater10([]) → 0
sumGreater10([3, -124, 7, 1, 8, 4]) → 0

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

public int sumGreater10(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: 245

Copyright Nick Parlante 2017 - privacy