Exercises

  1. 2.7 Discuss the meaning of each of the following objects:

    1. std::cin

    2. std::cout

  2. 2.8 Fill in the blanks in each of the following:

    1.            are used to document a program and improve its readability.

    2. The object used to print information on the screen is           .

    3. A C++ statement that makes a decision is           .

    4. Most calculations are normally performed by            statements.

    5. The            object inputs values from the keyboard.

  3. 2.9 Write a single C++ statement or line that accomplishes each of the following:

    1. Print the message "Enter two numbers".

    2. Assign the product of variables b and c to variable a.

    3. State that a program performs a payroll calculation (i.e., use text that helps to document a program).

    4. Input three ...

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.