WHAT ARE DECISION CONTROL STATEMENTS?
The decision control statements are the decision making statements that decides the order of execution of statements based on the conditions. In the decision making statements the programmer specify which conditions are to be executed or tested with the statements to be executed if the condition is true or false.
SOME OF THE DECISION CONTROL STATEMENTS ARE
- if statement
- if-else statement
- nested if statements
- switch statement
Let us discuss all these statements briefly.
The if statement consists a condition which is followed by one or some of the statements, if the condition is true then the statements will be executed or else not. This statement is the simple and easy decision control statement.
LET US HAVE A LOOK AT THE SYNTAX:
//statements to be executed if condition is true