scheme-playground/sicp-exercises/exercise1-3.scm

14 lines
217 B
Scheme
Raw Normal View History

2024-08-20 14:44:37 +00:00
(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))