C语言
-
if——选择结构的代表语句、判断条件的
-
if
-
if else (此外的意思)
-
if else if else、
-
int num = 100; int cost = 0; if (num > 200) cost = 1; else if (num > 300) cost = 2; else if (num > 80) cost = 3; else if (num > 70) cost = 4; else cost = 5; printf("tiaoc");
-
if 后面都有表达式、一般为逻辑表达式或者关系表达式、可以单独使用if语句、没有else、但是else不能单独使用、
-
、if语句可以嵌套、if里面包含if、
-
else和if的配对、else总和上一个未配对的if配对、
-