cpp for loop : syntax code example
Example 1: for loop c++
for (/* init var */;/* break condition */;/* mathmatic operation */) {
// do something
}
Example 2: for loop in c++
for (int i = 0; i < 10; i++)
{
cout << i << endl;
}
for (/* init var */;/* break condition */;/* mathmatic operation */) {
// do something
}
for (int i = 0; i < 10; i++)
{
cout << i << endl;
}