Conditional statements
Conditional Statements if statement
if else statement
nested if statement
else if ladder statement
switch statement
conditional (if statement)
; //no curly braces require for
one statement but for more than one we use curly braces.
Flow chart for if statement
Start
False
Condition
True
If Statement block;
End
If else statement
Flow chart for if else
Start
False
Condition
True
else
If statement statement
block block
End
ELSE IF LADDER STATEMENT
ELSE IF LADDER FLOW CHART
Start
condition True Statement
1 1
False
True Else if
condition
statement
2
1
False
True Else if
condition
statement
3
2
False End
Else
statement
Nested if statement
Nested if statement flow chart
Start
If False
condition
True
Another If
body
Else
After if body
Statemen
t
Stop
Switch statement
Flow chart for switch statement
Start
Switch (expression)
True Statement
Case 1 1
Break;
False
True Statement
Case
2
2
Break;
False
True Statement
Case n n
Break;
True
Default Statement
End
default