Forward for loop in C
Notes:
Forward for loop in C Programming Language:
- is a for loop in which counter variable is initialized with lower value , counter variable value is checked against the higher value and on every iteration counter variable value is incremented
Ex:
- Program to display 1 to 10
int i=0;
for(i=1; i<11; i++)
{
printf("%d\n",i);
}
- Program to display multiplication table for a given number in a forward order
int i=0;
int num=2;
for(i=1; i<11;i++)
{
printf("%d x %d = %d\n",num,i, num*i);
}