练习3-72原文Exercise 3.72. In a similar way to exercise 3.71 generate a stream of all numbers that can be written as the sum of two squares in three different ways (showing how they can be so written). 代码...
分类:
其他好文 时间:
2015-03-29 12:17:48
阅读次数:
147
练习3-67原文Exercise 3.67. Modify the pairs procedure so that (pairs integers integers) will produce the stream of all pairs of integers (i,j) (without the condition i < j). Hint: You will need to mix in...
分类:
其他好文 时间:
2015-03-29 10:55:03
阅读次数:
160
练习3-66原文Exercise 3.66. Examine the stream (pairs integers integers). Can you make any general comments about the order in which the pairs are placed into the stream? For example, about how many pairs...
分类:
其他好文 时间:
2015-03-29 10:55:03
阅读次数:
110
练习3-68原文Exercise 3.68. Louis Reasoner thinks that building a stream of pairs from three parts is unnecessarily complicated. Instead of separating the pair (S0,T0) from the rest of the pairs in the fir...
分类:
其他好文 时间:
2015-03-29 10:52:16
阅读次数:
136
练习3-64原文Exercise 3.64. Write a procedure stream-limit that takes as arguments a stream and a number (the tolerance). It should examine the stream until it finds two successive elements that differ in...
分类:
其他好文 时间:
2015-03-29 09:31:45
阅读次数:
133
练习3-65原文Exercise 3.65. Use the series
ln2 = 1- 1/2 + 1/3 - 1/4 + ……
to compute three sequences of approximations to the natural logarithm of 2, in the same way we did above for . How rapidly do the...
分类:
其他好文 时间:
2015-03-29 09:30:17
阅读次数:
165
练习3-53原文Exercise 3.53. Without running the program, describe the elements of the stream defined by (define s (cons-stream 1 (add-streams s s)))分析s是一串2的幂。也就是1、2、4、8、16、32……...
分类:
其他好文 时间:
2015-03-28 23:19:56
阅读次数:
396
前言 做过杭电、浙大或是北大等ACM题库的人一定对“刷题”不陌生,以杭电OJ为例:首先打开首页(http://acm.hdu.edu.cn/),然后登陆,接着找到“Online Exercise”下的“Problem Archive”,然后从众多题目中选择一个进行读题、构思、编程、然后提交、最后查....
此篇博客旨在测试Exercise 1,发现其中问题并解决。首先,我们使用codeblocks对Exercise 1进行编译。结果如下:可以发现经编译后的Exercise 1并无编译错误,只有两个warning,所以我们先不管warning内容,测试其功能所以,我们来分析代码部分:char buff[...
分类:
其他好文 时间:
2015-03-14 21:20:49
阅读次数:
159
Software Testing_1b-rev page17Exercise#1代码内容:#include int main(void){ char buff[10]; memset(buff,0,sizeof(buff)); gets(buff); printf(...
分类:
其他好文 时间:
2015-03-14 19:52:50
阅读次数:
108