O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Section 6.2 Essentials of Counter-Controlled Repetition

• Counter-controlled repetition requires a control variable, the initial value of the control variable, the increment (or decrement) by which the control variable is modified each time through the loop and the loop-continuation condition that determines whether looping should continue.

Section 6.3 for Repetition Statement

• The for header “does it all”—it specifies each of the items needed for counter-controlled repetition with a control variable. The general format of the for statement is

for ( initialization; loopContinuationCondition; increment )    statement

where the initialization expression names the loop’s control variable and provides its initial value, the loopContinuationCondition ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required