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

 

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

Write a method that returns the "Jump Sum" of a list of numbers starting at 'lowest' and going up by 'jump' each time. Stop adding the numbers when you get above 'highest'. For example, the "Jump Sum" with lowest=4, highest=15, and jump=3 would be found by adding 4+7+10+13 which equals 34. Note that the "Jump Sum" would be the same if highest was changed to 13 or 14, but if highest was 16, the "Jump Sum" would now be 50. The value of 'jump' will always be positive.


ppp1jumpSum(15, 16, 1) → 31
ppp1jumpSum(17, 20, 8) → 17
ppp1jumpSum(1, 10, 4) → 15

...Save, Compile, Run (ctrl-enter)

public int ppp1jumpSum(int lowest, int highest, int jump) { }

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: 260

Copyright Nick Parlante 2017 - privacy