Wyo C++ - Chapter 8 Resources

Chapter 8 Objectives

Chapter 8 Vocabulary

Ch. 8 Lecture Notes - loops

Ch. 8 Programming Assignment

Ch. 8 Worksheet #1 - writing loops

Ch. 8 Worksheet #2 - tracing nested loops

Ch. 8. Worksheet #3 - pseudocode using loops

Ch. 8 Worksheet #4 - writing program using another person's pseudocode

Ch. 8 Worksheet #5 - tracing loops with break and continue

Ch. 8 Worksheet #6 - tracing nested loops

Ch. 8 Worksheet #7 - tracing a simple loop

RndGen Worksheet #1 - generating pseudorandom numbers

Ch. 8 Practice Test

Ch. 8 Demo Program #1 - to illustrate the use of the for loop

Ch. 8 Demo Program #2 - to illustrate the use of the while and do while loops

Ch. 8 Demo Program #3 - to illustrate the use of determinate, indeterminate, and nested loops.

Ch. 8 Demo Program #4 - to illustrate the different ways to write a determinate for loop

Ch. 8 Demo Program #5 - to illustrate how to separate strings into separate characters and how to concatenate to strings

As a class, build several demonstration programs that ...

  • use a for loop
  • being sure to decrement a for loop's loop variable if using it later in a program
  • the equivalency of for (i = 0; i < 10; i++) and (i = 1; i <= 10; i++)
  • use a while loop
  • use a do/while loop
  • the use of break and continue statements in loops
  • using flag variables in control expressions of indeterminant loops
  • using sentinel values with indeterminate loop control expressions when obtaining input
  • using logical and relational operators in the control expressions of indeterminate loops
  • use nested loops
  • observe the proper use of curly braces and blank lines around loops for good style and readability