The C++Course provides a general introduction to programming in C++. It is based on A.B. Downey's book, How to Think Like a Computer Scientist. Click here for details. |
Home Iteration Iteration | ||
See also: The While Statement, For Loops | ||
Iteration
We have seen programs that use recursion to perform repetition, such as nLines and countdown. This type of repetition is called iteration, and C++ provides several language features that make it easier to write iterative programs. The two features we are going to look at are the while statement and the for statement.
|
||
Home Iteration Iteration |