5 Control Statements: Part 2; Logical Operators

Objectives

In this chapter you’ll:

  • Learn the essentials of counter-controlled iteration.

  • Use the for and dowhile iteration statements to execute statements in a program repeatedly.

  • Understand multiple selection using the switch selection statement.

  • Use the break and continue program-control statements to alter the flow of control.

  • Use the logical operators to form compound conditions in control statements.

  • Understand the representational errors associated with using floating-point data types to hold monetary values.

  • Understand some of the challenges of processing monetary amounts as we begin building a DollarAmount class, which uses integers and integer arithmetic to represent and manipulate ...

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.