Chinaunix首页 | 论坛 | 博客
  • 博客访问: 209683
  • 博文数量: 136
  • 博客积分: 2919
  • 博客等级: 少校
  • 技术积分: 1299
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-11 09:08
文章分类

全部博文(136)

文章存档

2013年(1)

2011年(135)

我的朋友

分类: LINUX

2011-12-05 08:47:38

  1. ;; mht created on Nov 8, 2011

  2. ;; tax : number -> number
  3. ;; to compute the tax on the gross pay
  4. (define (tax gp)
  5.   (* (/ 15 100) gp))

  6. ;(tax 100)


  7. ;; grosspay : number -> number
  8. (define (grosspay h)
  9.   (* h 12))

  10. ;; netpay : number -> number
  11. ;; to compute the net pay of an employee
  12. ;; from the number of hours worked
  13. (define (netpay h)
  14.   (- (grosspay h) (tax (grosspay h))))
  15. ;(tax (* 12 20))
  16. (= (netpay 20) 204)
阅读(339) | 评论(0) | 转发(0) |
0

上一篇:exam2.2.4

下一篇:exam2.3.2

给主人留下些什么吧!~~