about | help | code help+videos | done | prefs |
Write a method that returns the sum of all the positive numbers in an array of integers. Do NOT include the negative numbers in the sum. You may not use any functional programming. apr_9_2019_APSLHL_sumPositive([1, 1, 1, 1, 1, 1, 1, 1, 1]) → 9 apr_9_2019_APSLHL_sumPositive([-421, -4356, 123, 235, 768, -457]) → 1126 apr_9_2019_APSLHL_sumPositive([253, 235, 547, -23, -523, -152, 532, -64]) → 1567 ...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