public class Break{
public static void main(String[] args)
{
for(int i=0;i<=5;i++)
{
for(int j=1;j<=6;j++)
{
if(i==2&&j==3)
{
break;
}
System.out.println(i+" "+j);
}
}
}
}
OUTPUT:
0 1
0 2
0 3
0 4
0 5
0 6
1 1
1 2
1 3
1 4
1 5
1 6
2 1
2 2
3 1
3 2
3 3
3 4
3 5
3 6
4 1
4 2
4 3
4 4
4 5
4 6
5 1
5 2
5 3
5 4
5 5
5 6
public static void main(String[] args)
{
for(int i=0;i<=5;i++)
{
for(int j=1;j<=6;j++)
{
if(i==2&&j==3)
{
break;
}
System.out.println(i+" "+j);
}
}
}
}
OUTPUT:
0 1
0 2
0 3
0 4
0 5
0 6
1 1
1 2
1 3
1 4
1 5
1 6
2 1
2 2
3 1
3 2
3 3
3 4
3 5
3 6
4 1
4 2
4 3
4 4
4 5
4 6
5 1
5 2
5 3
5 4
5 5
5 6
No comments:
Post a Comment