循环的嵌套

3种循环(while循环、do...while循环和for循环)可以相互嵌套。书中给出了6种合法形式。另外两种是否合法呢?

(1)饮品店加盟

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片 while() {...      for(;;)        {...}  } 

(2)

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片 do{     ...     while()       {...}     ...  }while(); 

posted @ 2014-02-20 09:46  将夜  阅读(180)  评论(0编辑  收藏  举报