For-loops are a slightly more complicated than while and do-while loops but on the other hand they can solve more complicated tasks with less code. Here is the describing for-loops syntax and example:
for (initialization; condition; update)
{
loop's body;
}
|
A loop may contain another loop in his body This form of a loop is called nested loop. But in a nested loop, the inner loop must terminate before the outer loop.
for (initialization; condition; update)
{
for (initialization; condition; update)
{
loop's body;
}
}
|
We have a YouTube channel for live game streaming purposes, the channel name is "NightHawk". You can visit our gaming channel and support us, Thank you