循环结构


循环结构

  • 跳出外层循环:打标签

例:

outer: for(int i=0;i<5;i++)
{
	inner: for(int j=0;j<3;j++)
		{
			if(i==j)break outer;
		}
}

Author: havenochoice
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source havenochoice !
评论
  TOC