This preview shows page 1. Sign up to view the full content.
Unformatted text preview: • Ways of ending a loop 1. List headed by size 2. Ask before iterating 3. List ended with a sentinel value 4. Running out of input • Be careful and check if it’s off by one to fix common errors • When debugging, can trace the status of a variable by a cout statement at each loop • “If your program is very bad, do not try to debug it. Instead, throw it out and start over”...
View Full Document
This note was uploaded on 08/26/2009 for the course CS 140 taught by Professor Staff during the Fall '08 term at Southern Illinois University Edwardsville.
- Fall '08