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

Java > Logic-2 > evenlySpaced
prev  |  next  |  chance

Given three ints, a b c, one of them is small, one is medium and one is large. Return true if the three values are evenly spaced, so the difference between small and medium is the same as the difference between medium and large.

evenlySpaced(2, 4, 6) → true
evenlySpaced(4, 6, 2) → true
evenlySpaced(4, 6, 3) → false

...Save, Compile, Run

See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  CodingBat  >  Logic-2

Forget It! -- delete my code for this problem

New just for fun
 Random User Progress Graphs
 Random Epic Graphs 221.0

Copyright Nick Parlante 2006-11 - privacy