5.Loop

After finish this chapter, student will able to:

  • Control repetition task
  • Managing loop, increase or decrease values
  • Write code less than before

Loop used for repetition task that will run again and again when condition true and it will stop the process when the condition false.

There are three types of loop in C++ such:

  • While loop
  • Do while loop
  • For loop

Note: There are 3 things for controlling loop correctly :

  1. Initialization
  2. Condition
  3. Iteration
Suggest Edit