forgot password | create account
Or use
about | help | code help+videos | done | prefs
CodingBat code practice


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

public boolean evenlySpaced(int a, int b, int c) { }

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

Copyright Nick Parlante 2016 - privacy