about | help | code help+videos | done | prefs |
Write a method that finds the sum of all the integers in 'nums' but only if the corresponding index in 'include' is "true". So "true" in include means that you are to include the corresponding value in 'nums' in your sum. As a precondition you may assume that the two arrays are the same length. test2021_04_22_APP1SLHL_includeOrNot([14], [false]) → 0 test2021_04_22_APP1SLHL_includeOrNot([14], [true]) → 14 test2021_04_22_APP1SLHL_includeOrNot([50, 100, -50], [true, true, true]) → 100 ...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: 260
Copyright Nick Parlante 2017 - privacy