In: Computer Science
1)
The IF statement lets you execute a sequence of statements conditionally. That is, whether the sequence is executed or not depends on the value of a condition. There are three forms of IF statements: IF-THEN , IF-THEN-ELSE , and IF-THEN-ELSIF .
2)
if/else if
statement
You can add a trailing else statement to the if/else if statement if you want to execute code if none of the if statements are true.
Nested if statements
A nested if statement is an if statement placed inside another if statement. Nested if statements are often used when you must test a combination of conditions before deciding on the proper action.
3)
conditional statements, conditional expressions and conditional constructs are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false. Apart from the case of branch predication, this is always achieved by selectively altering the control flow based on some condition