Programming in C++ Dale/Weems/Headington Chapter 9 Additional Control Structures (Switch, Do..While, For statements)

9/20/99


Click here to start


Table of Contents

Programming in C++ Dale/Weems/Headington Chapter 9 Additional Control Structures (Switch, Do..While, For statements)

Switch Statement

PPT Slide

Switch Statement

Control in Switch Statement

Do-While Statement

PPT Slide

Do-While Loop vs. While Loop

Do-While Loop

A Count-Controlled Loop

PPT Slide

Example of Repetition

The output was:

What happens?

Count-controlled loop

What is output?

OUTPUT

What output from this loop?

OUTPUT

Several Statements in Body Block

Break Statement

Continue Statement

Imagine using . . .

Write prototype for void function

PPT Slide

PPT Slide

Write a function using prototype

Author: Sylvia Sorkin

Email: ssorkin@essex.cc.md.us

Home Page: http://www.essex.cc.md.us/Essex/People/ssorkin/index.html