Lecture 3 Objectives
At the end of today's class you should
KNOW:
- C's three looping constructs: while, do...while,
and for
- The difference between count-controlled loops and sentinel-controlled
loops
- How to use the post-increment/post-decrement operators
BE ABLE TO:
- Use any of C's looping constructs to accomplish iteration
Sample Exam Question:
Use a for-loop to calculate the sum of all the even numbers between
2 and 100, inclusive (the values 2 and 100 should be included in the sum).