id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > test2022_11_17_APP1SLHL_jumpingSum
prev  |  next  |  chance

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)

public int test2022_11_17_APP1SLHL_jumpingSum(int first, int jump, int max) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 230

Copyright Nick Parlante 2017 - privacy