?
What will be the output of the following C# code?
What will be the output of the following C# code?
static void Main(string[] args)
{
int i = 1, j;
do
{
for (j = 1; ; j++)
{
if (j > 2)
break;
if (i == j)
continue;
Console.WriteLine(i + " " + j);
}
i++;
} while (i < 3);
Console.ReadLine();
}
static void Main(string[] args)
{
int i = 1, j;
do
{
for (j = 1; ; j++)
{
if (j > 2)
break;
if (i == j)
continue;
Console.WriteLine(i + " " + j);
}
i++;
} while (i < 3);
Console.ReadLine();
}
Join the Discussion
Login to post a comment or share your explanation.
Login