- Loop
- Group of instructions computer executes repeatedly while some condition remains true
- Counter-controlled repetition
- Definite repetition: know how many times loop will execute
- Control variable used to count repetitions
- Sentinel-controlled repetition
- Indefinite repetition
- Used when number of repetitions not known
- Sentinel value indicates "end of data"
No comments:
Post a Comment