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

 

amjadm@miamioh.edu > addDivisibles
prev  |  next  |  chance

Given a positive int, return the sum of all even divisible numbers, e.g. num = 12--> divisibles are: 1, 2, 3, 4, 6 -> 2+4+6 = 12


addDivisibles(12) → 12
addDivisibles(1) → 0
addDivisibles(5) → 0

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

public int addDivisibles(int num) { }

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

Copyright Nick Parlante 2017 - privacy