Code Review
Compare your solutions
#| BEGIN (Введите свое решение) |#
(define (solution a b c)
(define (max a b)
(if (> a b) a b))
(define (square a) (* a a))
(if (> a b)
(+ (square a) (square (max b c)))
(+ (square b) (square (max a c)))))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (solution a b c)
(define (max a b) (if (> a b) a b))
(define (min a b) (if (< a b) a b))
(define (square a) (* a a))
(define (sum-of-squares a b) (+ (square a) (square b)))
(sum-of-squares (max a b) (max (min a b) c)))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (max a b) (if (> a b) a b))
(define (min a b) (if (< a b) a b))
(define (square a) (* a a))
(define (sum-of-squares a b) (+ (square a) (square b)))
(define (solution a b c)
(sum-of-squares (max a b)
(max (min a b) c)))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (solution a b c)
(define (max a b)
(if (> a b) a b))
(define (square a) (* a a))
(if (> a b)
(+ (square a) (square (max b c)))
(+ (square b) (square (max a c)))))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (solution a b c)
(define (max a b) (if (> a b) a b))
(define (min a b) (if (< a b) a b))
(define (square a) (* a a))
(define (sum-of-squares a b) (+ (square a) (square b)))
(sum-of-squares (max a b) (max (min a b) c)))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (max a b) (if (> a b) a b))
(define (min a b) (if (< a b) a b))
(define (square a) (* a a))
(define (sum-of-squares a b) (+ (square a) (square b)))
(define (solution a b c)
(sum-of-squares (max a b)
(max (min a b) c)))
#| END |#