问题补充:
如上
答案:
Chapter 1: Introduction
1.3 Because of round-off errors, it is customary to specify the number of decimal places that should be included in the output and round up accordingly. Otherwise, numbers come out looking strange. We assume error checks have already been performed; the routine SeparateO is left to the reader. Code is shown in Fig. 1.1.
1.4 The general way to do this is to write a procedure with heading void ProcessFile( const char *FileName );
which opensFileName,O does whatever processing is needed, and then closes it. If a line of the form
#include SomeFile
is detected, then the call ProcessFile( SomeFile );
is made recursively. Self-referential includes can be detected by keeping a list of files for which a call toProcessFileO has not yet terminated, and checking this list before making a new call toProcessFile.O
1.5 (a) The proof is by induction. The theorem is clearly true for 0 <XO ≤ 1, since it is true for XO = 1, and forXO < 1, logXO is negative. It is also easy to see that the theorem holds for 1 <XO ≤ 2, since it is true forXO = 2, and forXO < 2, logXO is at most 1. Suppose the theorem is true for pO <XO ≤ 2pO (where pO is a positive integer), and consider any 2pO <YO ≤ 4pO (pO ≥ 1). Then logYO = 1 + log (YO/ 2) < 1 +YO/ 2 <YO/ 2 +YO/ 2 ≤YO, where the first inequality follows by the inductive hypothesis.
[附件:]5083.pdf售价:70金币如何获得金币?