请定义一个过程,它以三个数为参数,返回其中较大的两个数之和。
scheme吧
全部回复
仅看楼主
level 1
(define (xydy x y)
(not (> x y )))
(define (two-min x y)
(if (xydy x y) x y))
(define (three-min x y z)
(if (xydy (two-min x y) z) (two-min x y) z))
(define (two-max-sum x y z)
(- (+ x y z) (three-min x y z)))
2012年09月22日 14点09分 1
level 1
觉得怪怪的,请大家指教,谢谢。
2012年09月22日 14点09分 2
level 7
三數之和減三數最小就好了嘛
(define (max-two-sum a b c)
(- (+ a b c)
(min a b c)))
2012年10月21日 05点10分 3
level 7
(define (max-two-sum a b c)
(- (+ a b c)
(min a b c)))
2012年10月21日 05点10分 4
level 7
(define (max-two-sum a b c)
__(- (+ a b c)
____(min a b c)))
百度你犀利
2012年10月21日 05点10分 5
1