18

3/3/98


Click here to start


Table of Contents

18

Counter-Controlled Repetition with a while Loop

The for Repetition Structure a.k.a. the for loop

When Does the for Loop Initialize, Test and Modify ?

A for Loop That Counts to 10

We can count backwards

We can count by twos ... or 7’s, or whatever ...

The do while Repetitive Structure

Example of a do while Loop

The while Loop that Tested User Input

Personal Preference

The char Data Type

Example

The getchar ( ) function

Example using getchar

The switch Multiple-Selection Structure

Author: Sue Bogar

Email: burt@umbc

Home Page: www.cs.umbc.edu/~burt