Loop Design
Loop design should consider:
- Initialization of conditions (Sum = 0)
- Termination of the loop (when N == 0)
- Testing (at the top or bottom of the loop)
- Updating conditions
- Of course, the body of the loop.
- (Sum = Sum + N; N = N -1;)
Body of the loop: Statements representing the process to be repeated. These are statements within the scope of a loop.