loop program for beginners code example
Example 1: for loops in cpp
for(int i=0; i<=limit; i++)
{
//statement
}
Example 2: for loop c
for(int i = 0; i<n ;i++) //i is the number of iterations that occur
{ //n is the total number of iterations
//code here
}
Example 3: for loop in c++
for (int i = 0; i < 10; i++)
{
cout << i << endl;
}