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

 

konstans@stuy.edu > sumAtoBcountingByC
prev  |  next  |  chance

Add up all of the integers from A to B inclusive, but you are counting by a variable increment. You may assume A <= B, and C is a positive value. e.g. sumAtoBincC(1,10,3) would add the values: 1,4,7,10. Though A and B are inclusive, B may not be included depending on the increment.


sumAtoBcountingByC(1, 10, 3) → 22
sumAtoBcountingByC(1, 10, 4) → 15
sumAtoBcountingByC(12, 33, 100) → 12

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

int sumAtoBcountingByC(int A, int B, int increment){ }

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

Copyright Nick Parlante 2017 - privacy