@songying
2019-03-06T05:57:43.000000Z
字数 511
阅读 1356
c++
; // 空语句
{ // 内容 }{} // 空块
if (condition1) {}else if(condition2){}else{}
switch(condition1){case val1:case val2:default:}
while (condition){statement;}
for ( init_statement; condition; expression){statement;}//范围for语句for (declaration:expression){statement;}
do {statement} while (condition);
break 只能出现在迭代语句或switch语句内部。
终止当前迭代并且立即开始下一次迭代
continue只能出现在for, while, do while 内部。
不要在程序中使用goto语句,因为它使得程序既难理解,又难修改。
