C Programming Tutorial
Computer Tutorial

Introduction to Loop



Introduction to Loop

A loop statement allows us to execute a statement or group of statements multiple times.
The versatility of the computer lies in its ability to perform a set of instructions repeatedly. This involves repeating some portion of the program either a specified number of times or until a particular condition is being satisfied. This repetitive operation is done through a loop control instruction.

Diagram to show the functionality of loop

Flow diagram to show the functionality of Loop

There are three methods by way of which we can repeat a part of a program :

1. Using a while Loop
2. Using a do-while Loop
3. Using a for Loop