Computer Science Using C++

Ch. 6 Exercises Remarks


Exercise 6-3 (p. 96)

Follow the directions as described in the textbook, but do not be surprised if attempting to execute the program causes a Windows NT 4.0 network error and prevents the file from executing. You should realize what caused this error having read ch. 6 and the purpose of Exercise 6-3 closely.

Exercise 6-5 (p. 101)

Note that you may have difficulty with the "cout.setf(ios::showpoint);" statement. Experiment with the program to try to make that command work. Also, note that the level of precision (# of digits after the decimal) may be different between the textbook's inline comments and your C++ environment.

Exercise 6-6 (p. 102+)

Be careful testing setw and setprecision. There may be inconsistencies with the way they are implemented in our C++ environment. If there are inconsistencies or specific differences in they way they are used in our C++ environment (compared to what is described in the textbook), be able to explain them. See the "Warning" on p. 102 of your textbook. It seems as though using fixed "cout.setf(ios::fixed);" before setprecision allows one to guarantee the number of digits of precision after the decimal point.

Exercise 6-10 (p. 105+)

Be sure to look up cin.get and cin.ignore in your online MS Visual C++ help resources since the textbook does not explain them too thoroughly.

Return to Ch. 6 Resources Page


Computer Science Using C++ Home Page | CMPSC 101 Home Page

Mr. Minich's Wyo Home Page | Mr. Minich's PSU Home Page

Minich.com Web Design