Several programming tasks reduce to generating regular number series. This is what you are going to study in this chapter. You will also get a better understanding of loops this way.
Every Other
You are already able to generate a simple number series, say from one to ten. You will tackle generating a bit more complex series now.
Task
In this task, you will display “every other” number until 20 (see Figure 22-1).
Figure 22-1 Displaying every other number
Solution
Here’s ...