The minimum number of times a for loop is executed is zero.
4. It is also possible to declare the counter variable in a for loop itself—for example,
for ( int count=1; count< 10; count++) {…}
5. We can also nest any of the three loops discussed so far into one another.
Such loops are called
nested loops. Note that loops should not overlap each other. Also note that one type of
loop construct can be nested in another type of loop construct. For instance, a for loop
may be nested within a while loop or do-while loop and vice versa. This depends on the
Do'stlaringiz bilan baham: |