Untitled

 

DIEGO PLASCENCIA SANABRIA  A01229988

An if statement can be followed by an optional statement else, it executes when the value for the if is false.

Syntax:

if(boolean_expression 1) {

// Executes when the boolean expression 1 is true }

else if( boolean_expression 2) {

// Executes when the boolean expression 2 is true }

else if( boolean_expression 3) {

// Executes when the boolean expression 3 is true }

else {

// executes when the none of the above condition is true. }

Here is a flow diagram:

thank you for reading it, I hope that it helped you. for more info and examples check this link:

http://www.tutorialspoint.com/cplusplus/cpp_if_else_statement.htm

CC BY 4.0 Untitled by diego plascencia is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.