3. Condition Statement
Condition Statement are used to
execute a set of statement on some
conditions. If the condition is true
then the set of statement are
executed otherwise the body is
skipped.
4. Types of Conditions Statement
There are three types of Condition
Statement.
• If Statement.
• If-else Statement.
• Nested If-else Statement.
5. If Statement
If statement is conditional statement. It is
use to execute a statement or a set of
statement against a given condition. If
given condition is true the assosiative
statement will execute. It is used for one
way decision making.
9. If-else Statement
If-else statement is conditional statement. It
is used for two way decision making. There
is one condition and two decision. If given
condition is true then first decision will
execute and second will be ignored. If given
condition is false then first decision will be
ignored and the second decision will be
executed.
11. Example
If ( a > b )
Printf ( “a is maximum” );
Else
Printf ( “b is maximum” );
And
If ( percentage>=60 )
Printf ( “pass” );
Else
Printf ( “fail” );