sicp exercise 1.3
This commit is contained in:
parent
fb6baaa630
commit
a92e918950
13
exercise1-3.scm
Normal file
13
exercise1-3.scm
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
(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))
|
Loading…
Reference in New Issue
Block a user