3. Control Statements

Object-Oriented Programming Using C++.

Control Statements

Study Guide

Basic Flow Of Control

Block Structure and Scope

Logical Expressions

Branching Overview

If Statements

temp.cpp (if)

Switches

temp.cpp (switch)

Switches vs. If-Else Ladders

Looping Overview

For Loops and For Range-Loops

multtab.cpp

While Loops

gcd.cpp

Do While Loops

calc.cpp

Understanding Loops

The Fence Post Problem

Loops And The Debugger

Loop Interruption: break And continue

Null Statements: Tricky Behavior Examined

More I/O Functions And Manipulators

Character Classification and Conversion Functions

Programming Examples

Flags and Accumulators

temp2.cpp

temp3.cpp

mortgage.cpp

pyramid.cpp

wc.cpp

Practice Problems

Supplemental: Legitimate Uses For goto