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

 

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

Write a method that returns the "hopping sum". This is found by adding a sequence of numbers that starts with 'first' and goes up by 'hop' a total of 'howMany' times. For example, if 'first' is 10, 'hop' is 3, and 'howMany' is 4, you would obtain the answer by adding: 10+13+16+19+22 which equals 80. Look at the test data for additional examples.


test2021_04_08_APP1SLHL_hoppingSum(10, 3, 4) → 80
test2021_04_08_APP1SLHL_hoppingSum(2, 17, 2) → 57
test2021_04_08_APP1SLHL_hoppingSum(50, -10, 4) → 150

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

public int test2021_04_08_APP1SLHL_hoppingSum(int first, int hop, int howMany) { }

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

Copyright Nick Parlante 2017 - privacy