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

 

soweigel@smsd.org > sumNoMultiples3
prev  |  next  |  chance

Given two integers, start and stop, return the sum of all of the integers from start to stop, including start and stop but not including any integer that is a multiple of 3. For example if start = 1 and stop = 9, then find and return the sum 1 + 2 + 4 + 5 + 7 + 8. You may assume that start <= stop.


sumNoMultiples3(-11, 0) → -48
sumNoMultiples3(3, 6) → 9
sumNoMultiples3(1, 9) → 27

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

public int sumNoMultiples3(int start, int stop) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy