Kotlinlearncs.online LogoJava
Return to List

Solve: Close Far

Imported By: Geoffrey Challen
/ Version: 2021.7.0

Given three ints, a, b, and c, return true if one of b or c is close, differing from a by at most 1, while the other is far, differing from both other values by 2 or more.

fun closeFar(
a: Int,
b: Int,
c: Int,
): Boolean {
return false // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: