SCHEME
Code:
(define (between? x a b)
(cond ((or (and (> x a) (< x b)) (and (> x b)(< x a)))
#t) ;;if value is betwwen a and b OR b and a return true
(else #f))) ;;else return false
Snapshot of Code and Output:
Get Answers For Free
Most questions answered within 1 hours.