2. The if statement Form3: if ( expression ) statement1 else if ( expression ) statement2 else statement3 Form2: if ( expression ) statement1 else statement2 Form1: if ( expression ) statement1
3.
4. The if statement & depend on statement Statement1 will be executed when the variable equals to literal constant1. Statement2 will be executed when the variable equals to literal constant2. Statement3 will be executed when the variable equals to literal constant3. Statement4 will be executed when the variable doesn’t equal to any literal constant. depend on (variable) equal to literal const1 : statement1 equal to literal const2 : statement2 equal to literal const3 : statement3 default : statement4 if (variable = literal const1) statement1 else if (variable = literal const2) statement2 else if (variable = literal const3) statement3 else statement4