about | help | code help+videos | done | prefs |
mar7_2017_APSLHL_sumGreater
Write a method that returns the sum of all the elements in 'nums' that are greater than 'boundary'. For example, if nums={3,6,2,5} and boundary=3 the method would return a value of 11 since 5+6=11. Only 5 and 6 are greater than 3, so those would be the only numbers from the array used in the sum. mar7_2017_APSLHL_sumGreater([253, 214, 24], 50) → 467 mar7_2017_APSLHL_sumGreater([241], 1) → 241 mar7_2017_APSLHL_sumGreater([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], -42) → 144 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 280
Copyright Nick Parlante 2017 - privacy