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

 

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

Given three integers, a b c, return true if the three values are evenly spaced. This means that the difference between the smallest and the medium is the same as between the medium and the largest.


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

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

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

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