Control Flow Statements-Conditional Statements
Control Flow Statements-Conditional Statements
Parne
Assistant Professor,
CoED, SVNIT Surat.
Control Flow Statements:
When we need to execute a set of statements based on a condition
then we need to use control flow statements.
In programming, it's often desirable to execute a certain section of
code based upon whether the specified condition is true or false
(which is known only during the run time). For such cases, control
flow statements are used.
if statement
nested if statement
if-else statement
if-else-if statement
If statement :
If statement consists a condition, followed by statement or a set of statements
as shown below: