Code Review

Compare your solutions

    #| BEGIN (Введите свое решение) |#
(define (>= x y)
  (if (or (> x y) (= x y)) #t #f))

(define (square x)
  (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c)
  (cond
    ((and (>= a c) (>= b c)) (sum-of-squares a b))
    ((and (>= a b) (>= c b)) (sum-of-squares a c))
    ((and (>= b a) (>= c a)) (sum-of-squares b c))))
#| END |#
    #| BEGIN (Введите свое решение) |#
(define (square x)
  (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c)
  (cond
    ((and (>= a c) (>= b c)) (sum-of-squares a b))
    ((and (>= a b) (>= c b)) (sum-of-squares a c))
    ((and (>= b a) (>= c a)) (sum-of-squares b c))))
#| END |#
    #| BEGIN (Введите свое решение) |#
(define (>= x y)
  (if (or (> x y) (= x y)) #t #f))

(define (square x)
  (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c)
  (cond
    ((and (>= a c) (>= b c)) (sum-of-squares a b))
    ((and (>= a b) (>= c b)) (sum-of-squares a c))
    ((and (>= b a) (>= c a)) (sum-of-squares b c))))
#| END |#
    #| BEGIN (Введите свое решение) |#
(define (square x)
  (* x x))

(define (sum-of-squares x y)
  (+ (square x) (square y)))

(define (solution a b c)
  (cond
    ((and (>= a c) (>= b c)) (sum-of-squares a b))
    ((and (>= a b) (>= c b)) (sum-of-squares a c))
    ((and (>= b a) (>= c a)) (sum-of-squares b c))))
#| END |#