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 'stopVal'. For example, if 'nums' is {5,7,13,8,2,15,11} and 'stopVal' is 8, you would return 25 since 5+7+13=25. nov21_2019_APP1SLHL_addUntil([], 52) → 0 nov21_2019_APP1SLHL_addUntil([12], 12) → 0 nov21_2019_APP1SLHL_addUntil([5, 2, 3, 7, 8, 2, 4, 9, 6, 1], 9) → 31 ...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