simply scheme 第四章 练习
2010-07-04 10:55
176 查看
4.1 (+ 8 (* 2 12))
4.2 A->(B +)->(C *)
4.4 (1) two return values
(2) wrong expression
(3) no argument
(4) less argument
(5) incorrect argument
4.5 (define (ftoc f)
(* (/ 5 9)(- f 32)))
(define (ctof c)
(+ 32 (* c (/ 9 5))))
4.6 (define (fourth x)
(* x x x x))
(define (fourth x)
(square (square x)))
4.7 (define (abs x)
(square (square x)))
4.8 (define (scientific x y)
(* x (expt 10 y)))
(define (sci-e x)
{floor (+ 0.5 (/ (log x) (log 10)))})
(define (sci-c m)
{/ m (expt 10 (sci-e m))})
(define (tip fee)
{- (ceiling (* 1.15 fee)) fee})
4.9 (define (discount x y)
{* x (- 1 (/ y 100))})
4.10 (define (tip fee)
{- (ceiling (* 1.15 fee)) fee})
4.2 A->(B +)->(C *)
4.4 (1) two return values
(2) wrong expression
(3) no argument
(4) less argument
(5) incorrect argument
4.5 (define (ftoc f)
(* (/ 5 9)(- f 32)))
(define (ctof c)
(+ 32 (* c (/ 9 5))))
4.6 (define (fourth x)
(* x x x x))
(define (fourth x)
(square (square x)))
4.7 (define (abs x)
(square (square x)))
4.8 (define (scientific x y)
(* x (expt 10 y)))
(define (sci-e x)
{floor (+ 0.5 (/ (log x) (log 10)))})
(define (sci-c m)
{/ m (expt 10 (sci-e m))})
(define (tip fee)
{- (ceiling (* 1.15 fee)) fee})
4.9 (define (discount x y)
{* x (- 1 (/ y 100))})
4.10 (define (tip fee)
{- (ceiling (* 1.15 fee)) fee})
相关文章推荐
- Java笔记 第四章 (4)Java面向对象编程基础 (实战练习)
- HTML第四章上机练习4
- 第四章例题练习
- c++ primer plus(第6版)中文版 第四章编程练习答案
- python编程:从入门到实践-第四章练习
- C语言 第四章 分支结构练习
- 《java编程思想》第四章练习10找出所有四位数的吸血鬼数
- 《学习OpenCV》第四章练习答案1-b,1-c,2-a
- C# 第四章 上机练习模拟顾客点餐
- 第一本书 第四章 课上练习 (子查询,in ,分页 ,exists)
- 现代软件工程 第四章 【结对编程】练习与讨论
- 第四章 4.4节练习
- 《算法导论》第四章-第5节_练习(参考答案)
- simply scheme 第七章 练习
- C++ Primer Plus(第六版)第四章编程练习参考答案
- C primer plus(第五版)编程练习第四章
- [第二周]第四章课后练习
- 高级编程技术作业第二周2 第四章课后练习
- 斐波那契数Fibonacci,Java编程思想第四章练习9答案
- Python核心编程 练习 第四章