Condition statements are used to decide the flow
of execution based on different conditions.
1. IF statement- IT EXCUTES A BLOCK OF CODE IF A
SPECIFIED CONDITION IS TRUE. IF IT IS FALSE IT
DOES NOTHING.
2. IF ELSE statement- IT IS USED TO CREATE IF
CONDITIONAL STATEMENT WITH IT’S OPTIONAL
ELSE STATEMENT.
3. IF ELSE LADDER statement- LOOP/NESTED LOOP.
Conditional
Conditional statements are used to decide the flow
of execution
based on different conditions. If a condition is
true,
you can perform one action and if the condition is
false,
you can perform another
if statement executes a block of code if a specified
condition
is true. if it is false then, do nothing.
for every condition there will be two outcomes
ie,. true or false
for if else condition
It is used to create if conditional statement with its
optional
else statement. It tests only specific condition i.e
if the condition in the program is true,
the condition executes the if statement.
If the condition is false then the conditional
statement jumps
to else statements.