A case when some of the statements are repeated again and again until the condition given becomes True or False is called looping. For this three statements are must :
Statement to initialize the variable
- Change the value of the variable choosen for condition
- a conditional statement
- do---while(<condition>)
- while(<condition>){ }
- for(<initialization> ; <condition>; <increment/decrement>)