exam2.3.2

351阅读 0评论2011-12-05 maunix
分类:LINUX

  1. ;; mht created on Nov 8, 2011

  2. ;; sum-coins : number number number number -> number
  3. ;; to compute the value of a bag of coins
  4. (define (sum-coins n-1 n-5 n-10 n-25)
  5.   (/
  6.    (+ (* 1 n-1) (* 5 n-5) (* 10 n-10) (* 25 n-25))
  7.    100))

  8. (sum-coins 100 20 10 4)
上一篇:exam2.3.1
下一篇:exam2.3.3