about | help | code help+videos | done | prefs |
Write a method that finds the sum of all the integers in an array called 'nums', up to, but not including the first occurrence of ANY numbers in the 'stopVals' array. For example, if 'nums' is {5,7,13,8,2,15,11} and 'stopVals' is {9,15,13,44), you would return 12 since 5+7=12. Look at the test data for more examples. You may NOT use ANY classes such as ArrayList or any similar classes. nov21_2019_SLHL_addUntilAny([], []) → 0 nov21_2019_SLHL_addUntilAny([7, 7, 7, 7, 7, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10]) → 42 nov21_2019_SLHL_addUntilAny([18, 12, 1812], [4, 87]) → 1842 ...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