< previous page
page_86
next page >
Page 86
9. Write an output statement to print out the title of this book
Programming and Problem Solving with C++).
(pp. 6870)
10. What does the following statement print out?
cout < The answer is < 2 + 2 < endl;
(pp. 6870)
11. The following program code is incorrect. Rewrite it, using correct syntax for the comment.
float annualReceiptsMA; / Total of monthly cash
/ receipts in the
/ Massachusetts store
(pp. 7071)
12. Fill in the blanks in this program.
#include ______
const float PI = 3.14159; // Ratio of circumference
// to diameter
int ______()
______
float circumference; // The computed circumference
// of the circle
circumference ______ PI * 7.8;
______ << The circumference of a circle;
______ << of diameter 7.8 is ______ endl;
______ << circumference ______ endl;
return ______;
______
(pp. 7177)
13. What should you do if a program fails to run correctly and the reason for the error is not immediately obvious? (pp. 7781)
< previous page
page_86
next page >