Code Review
Compare your solutions
#| BEGIN (Write your solution here) |#
(define (max a b c)
(cond ((and (>= a b) (>= a c)) a)
((and (>= b a) (>= b c)) b)
(else c)))
(define (secondToMax a b c)
(cond ((or (and (>= a b) (<= a c)) (and (>= a c) (<= a b))) a)
((or (and (>= b a) (<= b c)) (and (>= b c) (<= b a))) b)
(else c)))
(define (square x) (* x x))
(define (solution a b c)
(+ (square (max a b c)) (square (secondToMax a b c))))
(solution 1 2 3)
#| END |#