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

 

orion.a.smith@gmail.com apcsa-primitives > apcsaPrimitivesSameDistance
prev  |  next  |  chance

Given three numbers a, b, and c, return true if the distance between any two of the numbers is the same, in absolute terms. Precondition: a, b, and c will all be different numbers.

HINT
Make sure you account for all the possibilities.

apcsaPrimitivesSameDistance(5, 6, 7) → true
apcsaPrimitivesSameDistance(5, 6, 8) → false
apcsaPrimitivesSameDistance(2, 1, 3) → true

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

public boolean apcsaPrimitivesSameDistance(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

Difficulty: 100

Copyright Nick Parlante 2017 - privacy