Conditional Statements ======================= Sequential Execution: ===================== ==> Statement after the statement Ex: statement-1 statement-2 statement-3 Why conditional statements? =========================== to make execute the application based on the selection we can use "conditional statements". Types of Conditional Statements: ================================= ==> different types: 1) simple if statement 2) if-else statement 3) nested if else statement 4) if else if else ladder statement 5) switch statement here, all the above statements must be work according to the condition. condition ==> Relational operators (<, >, <=, >=, ==, !=) 1) simple if statement ====================== Syntax: if(condition) { // if-block statements statement-1; statement-2; } ==> if the condition is "true" then, the control can execute the statements in if-block. If the condition is "false", there is no output from the given program/application. ==> To overcome this, if we can define a statement after the if block: in this case: if the condition is "false" then, the control can execute the statement after the if block. But when the condition is "true" then, the control can execute the program as normal (sequential execution).