Loop is an important part or feature of any programming language .loops are designed to perform a particular task multiple times in order to
perform a particular task multiple times in order to perform a loop we require following three parts.

1-:Assignment operator
2-:Condition operator
3-:Increament/decreament operator

Assignment operator-:Assignment is a simple statement where we assign value to a variable for example a=5

Condition-:It is a conditional statement that checks for continuation or termination of loop for example a<=100

Increament/decreament-:These are the operators that increase or decrease the values of the looping variables for example a++


Note-:Assignment is often called as base value because loop starts from this value and condition is calle peak value because loop teminates here.

Following are the three standard loops use in c language

1-:The for loop
2-:The while loop
3-:The do while loop

The for loop is one of the simplest loop this is because all the three parts of a loop are written along side,seperated by semicolan(;).

Syntax-:
For(assignment ;condition;increament/decreament)
{
______________
______________
______________
______________
}


A program to print name 5 times -:

#include< stdio.h>
#include< conio.h>
void main()
{
int i;
for(i=1;i<=5;i++)
{
printf("xyz");
}
getch();
}
Program to print a count from 100 to 1




#include< stdio.h>
#include< conio.h>
void main()
{
int i;
for(i=100;i>=1;i--)
{
printf("%d",i);
}
getch();
}




Program that prints all odd numbers between 20 to 77




#include< stdio.h>
#include< conio.h>
void main()
{
int i;
for(i=20;i<=77;i++)
{
if(i%2==1)
{
printf("%d",i);
}
}
getch();
}


Program to print the table of the entered number

#include< stdio.h>
#include< conio.h>
void main()
{
int i,n,s;
for(i=1;i<=10;i++)
{
s=n*i;
printf("%d",s);
}
getch();
}