Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Exercise 1.3 - Define a procedure that takes three numbers
- ; and returns the sum of the squares of the two larger numbers.
- (define (sum-of-squares a b)
- (+ (* a a) (* b b)))
- (define (foo 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))))
Add Comment
Please, Sign In to add comment