4.Loop #

After finish this chapter, students will be able to:

  • Control repetition task
  • Managing loop, increase or decrease values
  • Write fewer codes than before

Loop used for repetition task that run again and again when the condition is true and it will stop the process when the condition is 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