Skip to content
Quiz · Conditions and loops · lesson 12 of 13

Quiz — break in a nested loop

What does the program print?

C#
for (int i = 1; i <= 3; i++)
{
    for (int j = 1; j <= 3; j++)
    {
        if (j == 2)
        {
            break;
        }
        Console.Write(i);
    }
}