To see a step-by-step illustration of a for loop,look for the Flash movie in the Chapter 6 folder on the
CD-ROM included with this book.Click on the link for Chapter 6 to start the movie.
CODE IN ACTION
Then the user’s prompt would look like that shown in Figure 6.22.
We can also decrement the loop control variable.Example 6.17 shows an
application that reads a sentence entered by the user and prints the sen-
tence backward.
The pseudocode for this program is the following:
set backwards to an empty ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.