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

No credit card required

### Exercises

6.5 Describe the four basic elements of counter-controlled repetition.

6.6 Compare and contrast the `while` and `for` repetition statements.

6.7 Discuss a situation in which it would be more appropriate to use a `do`...`while` statement than a `while` statement. Explain why.

6.8 Compare and contrast the `break` and `continue` statements.

6.9 Find and correct the error(s) in each of the following segments of code:

a)

For ( i = 100, i >= 1, ++i )    Console.WriteLine( i );

b) The following code should display whether integer `value` is odd or even:

switch ( value % 2 ) {    case 0:       Console.WriteLine( "Even integer" );    case 1:       Console.WriteLine( "Odd integer" ); } // end switch

c) The following code should ...

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

No credit card required