about | help | code help+videos | done | prefs |
Write a method that returns the sum of an array of integers 'nums', except do not include any occurrence of the number 'omit' in the array. If all of the values in the array equal 'omit', then return the sum as zero. Look at the test data for examples. The array can be of any length, including a length of zero, in which case you should return zero. Sept13_2019_SLHL_sumOmit([5, 4, 3, 7, 6, 5, 8, 7, 6, 5, 4, 1], 5) → 46 Sept13_2019_SLHL_sumOmit([7], 2) → 7 Sept13_2019_SLHL_sumOmit([], 5) → 0 ...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: 270
Copyright Nick Parlante 2017 - privacy