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

 

chandru.narayan@bush.edu intbool1 > fillGap
prev  |  next  |  chance

Fill a "gap" of with an integer number of bricks available in 2 sizes - "smallQty" of 5-cm bricks and "bigQty" of 1-cm bricks. Return a boolean variable of true if possible and false if not possible. You may want to use the mod operator "%" to solve this problem.


fillGap(8, 3, 1) → true
fillGap(9, 3, 1) → false
fillGap(7, 3, 1) → true

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

public boolean fillGap(int gap, int smallQty, int bigQty) { }

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: 100 Post-solution available

Copyright Nick Parlante 2017 - privacy