> For the complete documentation index, see [llms.txt](https://catherine-leung.gitbook.io/introduction-to-programming-using-c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://catherine-leung.gitbook.io/introduction-to-programming-using-c/iteration.md).

# Iteration

Iteration is the process of doing something over and over. Along with selection, you will use iteration to control the flow of programs to achieve a solution to your problem.

You will know when you need to use an iteration construct by looking at your flow chart for a problem. If you have to make the same decision over and over, you need an iteration control structure. If you only need to make that decision once, you need a selection control structure.

There are 3 main ways to control iteration in C.

* while
* for
* do-while

We will look at problems for each of these in the sections that follow.
