9/17/2008
9/17/2008
9/17/2008
9/17/2008
The Nested-for Statement
•Nesting a for statement inside another for statement is commonly used technique in programming.
•Let’s generate the following table using nested-for statement.
ch6-1
Just an if statement can be nested inside another if statement, we often nest for loops. For example, using a nest-for loop is the most appropriate way to generate a table such as the illustration.