about | help | code help+videos | done | prefs |
Write a method that returns the sum of the numbers in 'nums' but ONLY including numbers that have a remainder of 'remain' when divided by 'div'. For example, if 'nums' is {6,14,21,24}, 'div' is 5, and 'remain' is 1, you would return 27 (the sum of 6 plus 21). NOTE: You may assume that none of the integers passed in as parameter are negative. Look at the test data for additional examples. test2023_09_08_SLHL_([28, 40, 55, 152], 10, 8) → 28 test2023_09_08_SLHL_([5, 10, 15, 20, 25, 30, 35, 40, 45], 10, 0) → 100 test2023_09_08_SLHL_([5, 10, 15, 20, 25, 30, 35, 40, 45], 5, 0) → 225 ...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: 220
Copyright Nick Parlante 2017 - privacy