1 if( a == 10 ) {
2 cout << "Value of a is 10" << endl;
3 } else if( a == 20 ) {
4 // if else if condition is true
5 cout << "Value of a is 20" << endl;
6 }
1if(boolean_expression 1) {
2 // Executes when the boolean expression 1 is true
3} else if( boolean_expression 2) {
4 // Executes when the boolean expression 2 is true
5} else if( boolean_expression 3) {
6 // Executes when the boolean expression 3 is true
7} else {
8 // executes when the none of the above condition is true.
9}
10