Hi!
Just out of curiosity, I'd like to know if there any way that in a single 'for loop', one statement can loop after the other completes the loop. Not that I know of.
Code Snippet:
using System;
class MainClass
{
static void Main()
{
for(int i=0; i<5; i++)
{
Console.WriteLine("Statement 1");
Console.WriteLine("Statement 2");
}
}
}
The output for the code snippet would be:
Statement 1
Statement 2
Statement 1
Statement 2
Is there any way that the Statement 2 can loop after the Statement 1 completes the loop like:
Statement 1
Statement 1
Statement 2
Statement 2
Thanks