Chapter 6. Control Statements: Part 2

 

Not everything that can be counted counts, and not everything that counts can be counted.

 
 --Albert Einstein
 

Who can control his fate?

 
 --William Shakespeare
 

The used key is always bright.

 
 --Benjamin Franklin
 

Every advantage in the past is judged in the light of the final issue.

 
 --Demosthenes

Objectives

In this chapter you’ll learn:

  • The essentials of counter-controlled repetition.
  • To use the for and do...while repetition statements.
  • To use the switch multiple selection statement.
  • To use the break and continue statements to alter the flow of control.
  • To use the logical operators to form complex conditional expressions.

Outline

Get Visual C# 2010: How to Program, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.