C language
-
If — the representative statement and judgment condition of the selection structure
-
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");
-
There are expressions after if, which are generally logical expressions or relational expressions. If statements can be used alone. There is no else, but else cannot be used alone
-
. if statements can be nested. If contains if
-
Pairing of else and if, pairing of the previous unpaired if
-