Introduction to Loops
Introduction to Loops
Looping control structures have an iterative nature, which implies repeating a process according to the need of the program. Sometime, we find such practical scenarios, where we may have to repeat a particular task many times. performing such a task by repeating the corresponding statement is a bad programming practice. hence, to avoid the repetition of the same code, Looping Control Structure is used.
A simple looping control structure has a condition and a block of statements. Till the time the specified condition remains true, the compiler keeps executing the loop and the subsequent written in its body. The code repeated in such manner is called iteration. A looping control structure contains the following parts :