The prompt is to define a procedure that returns the sum of the squares of the two largest of three numbers.
I know this isn't exactly an elegant solution, but this is what I hacked together:
(define (largest-of-two-sum-of-squares x y z)
(cond ((and (< x y) (< x z)) (sum-of-squares y z))
((and (< y z) (< y x)) (sum-of-squares x z))
((and (< z x) (< z y)) (sum-of-squares x y)))))
What I'm wondering is why I'm getting an error.
;The object 85 is not applicable
The number that follows the word object is always the correct answer, btw. I am a scheme beginner, it must be something in my syntax?
Thanks