about | help | code help+videos | done | prefs |
Write a method that returns the sum of all the positive numbers in array 'nums', UNLESS 'reverse' is 'true'. In that case return the sum of all the negative numbers in the array. mar5_2020_APP1SLHL_sumPos([6152, 4352, -352, 346, -685], false) → 10850 mar5_2020_APP1SLHL_sumPos([6152, 4352, -352, 346, -685], true) → -1037 mar5_2020_APP1SLHL_sumPos([-521, -24, 36, 235, 754, -352], false) → 1025 ...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: 290
Copyright Nick Parlante 2017 - privacy