< 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?
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
cout < The answer is  < 2 + 2 < endl;
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
(pp. 6870)
11. The following program code is incorrect. Rewrite it, using correct syntax for the comment.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
float annualReceiptsMA;   / Total of monthly cash
                          / receipts in the
                          / Massachusetts store
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
(pp. 7071)
12. Fill in the blanks in this program.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
#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 ______;

______
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
(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 >