目录
if条件结构
Eg
if-else选择结构
Eg
if-else if-else选择结构
if语句的嵌套
在if语句的代码块中写其它if语句
switch...case选择结构
switch (选择变量)
{
case 值1:
…
break;
case 值2:
…
break;
case 值3:
…
break;
...
...
default :
…
}
switch...case的其他特征
目录
Eg
Eg
在if语句的代码块中写其它if语句
switch (选择变量)
{
case 值1:
…
break;
case 值2:
…
break;
case 值3:
…
break;
...
...
default :
…
}
switch...case的其他特征