ex1.3

$ SaVvY/» computer 2015. 4. 30. 16:07

세 숫자를 인자로 받아 그 가운데 큰 숫자 두 개를 제곱한 다음, 그 두 값을 덧셈하여 내놓는 프로시저


(define (square x) (* x x) )

(define (sum_of_squares a b) (+ (square a) (square b)))

(cond ((= (min a b c) a) (sum_of_squares b c))
        ((= (min a b c) b) (
sum_of_squares a c))
        (else (calc a b)))


'$ SaVvY > » computer' 카테고리의 다른 글

My .vimrc collection  (0) 2016.03.13
이통3사 USIM개통용 단축번호  (0) 2015.06.24
Magic methods implemented with python.  (0) 2015.04.25
gfxCardStatus : 그래픽카드 고정시키기.  (1) 2015.02.02
Little/Big-Endian 고려하기.  (0) 2015.01.14
Posted by Jason Ryu
,