about | help | code help+videos | done | prefs |
Write a method that returns the sum of all the integers starting at 'first' and going up by 'jump' while staying less than or equal to 'max'. For example, if 'first' is 3, 'jump' is 2, and 'max' is either 7 or 8, the result would be 15 because: 3+5+7=15 preconditions: max>first jump>0 test2022_11_17_APP1SLHL_jumpingSum(14, 8, 67) → 266 test2022_11_17_APP1SLHL_jumpingSum(-40, 10, -10) → -100 test2022_11_17_APP1SLHL_jumpingSum(-50, 2000, 1000) → -50 ...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: 230
Copyright Nick Parlante 2017 - privacy