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

 

tmhscs@gmail.com logic > logic_squarePossible
prev  |  next  |  chance

Given one integer "oneFooters" and another integer "fiveFooters", where those represent how many 1' and 5' pieces of wood that you have, return true if it is possible to lay them all on the ground and create a square. Example: If you have fifteen 1' pieces and one 5' piece, you can create a square where each side has a length of 5'. Note: You must use all of the pieces of wood!


logic_squarePossible(3, 3) → false
logic_squarePossible(13, 5) → false
logic_squarePossible(14, 5) → false

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

public boolean logic_squarePossible(int oneFooters, int fiveFooters) { }

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