Decion control statements:
When dealing with section statements,there are generally three versions:
1 one-way
2 two way
3 three way
One way decision statements do a perticular thing or they don't .
two way decision statement can do one think /do another.
Multi-way decision statements can do of many different thinks depending on the value of an expression.
1] if [one way decision ]
One way decisions are handled with an if statements that either do some particular things.
The decision is based on a text expression that evaluates to either true or false.
If the test expression evaluates of true,
The corresponding statements is executed;
If the test expression evaluates to false,
Control goes to the next executable statement.
Following syntax of one way decision statement:
Syntax=
If [Expression ]
{
Statements;
}
if else
No comments:
Post a Comment