Iterative Statement : for Loop

For some programming objectives it is necessay to repeat a set of statements a number of times until a certain condition is fulfilled. In such situations iteration statements can be used. The iteration statements are also called loops or looping statements.
Parts of a loop
1. Initialization Expression.
2. Test Expression
3. Update Expressions
4. Body of the loop.
The for Loop
The for loop is a deterministic loop in the sense that the program knows inadvance how many times the loop is to be executed.
LEARN MORE>>

No comments: