break是中断循环,退出while循环体;
continue是跳出本次循环,执行下一个循环;
return是跳出循环体所在的方法
测试代码,return 方法,不管你while 有几级,都会跳出所在的方法。
int tttt(void)
{
int a=0;
while(1)
{
// a++;
if(a == 50) return a;
// else return 0;
while(1)
{
a++;
if(a == 50) return a+10; //直接跳出tttt()函数,去执行主方法中的下面方法
}
}
}