21
1
using System;
2
3
public class BreakInsideNestedForProgram
4
{
5
public static void Main()
6
{
7
for(int i=1; i <= 3; i++)
8
{
9
for(int j=1; j <= 3; j++)
10
{
11
// if value of j =2 , exit from inner loop
12
if(j==2)
13
{
14
break;
15
}
16
Console.WriteLine(i +" "+j );
17
}
18
Console.WriteLine("End of loop number "+i+" for i");
19
}
20
}
21
}
Cached Result