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

 

findGoodOnes


Using a for loop, find how many numbers are divisible by 3 or 4 between first and last inclusive. So if they give you 5,12 -> it would return 4 (because 6,8,9,12 work).


findGoodOnes(6, 12) → 4
findGoodOnes(12, 20) → 5
findGoodOnes(1, 100) → 50

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

public int findGoodOnes(int first,int last) }

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