how to jump by 2 steps in for loops in c++ code example
Example 1: for loops in cpp
for(int i=0; i<=limit; i++)
{
//statement
}
Example 2: for loop in c++
for ( int i = 0; i < 5; i++)
{
cout << "Hello" << endl;
}
// prints hello 5 times.
for(int i=0; i<=limit; i++)
{
//statement
}
for ( int i = 0; i < 5; i++)
{
cout << "Hello" << endl;
}
// prints hello 5 times.