14 lines
217 B
Scheme
14 lines
217 B
Scheme
|
(define (square-sum-larger-two a b c)
|
||
|
(if (< a b)
|
||
|
(if (< a c)
|
||
|
(+ (* c c) (* b b))
|
||
|
(+ (* a a) (* b b)))
|
||
|
(if (> c b)
|
||
|
(+ (* c c) (* a a))
|
||
|
(+ (* b b) (* a a)))
|
||
|
)
|
||
|
)
|
||
|
|
||
|
|
||
|
(print (square-sum-larger-two 4 3 2))
|