Write down about the if-else statement

Last updated on June 13th, 2020 at 08:25 pm




The if-else statement : The general form of the if….else statement is as follows,






if (test expression){
true-block statements;
}
else{
False-block statements;
}
statement-x
Here, if the test expression is true, then the true-block statements will be executed, otherwise the false-block statements will be executed. In either case, either true block or false block statements will be executed, not both. The general form can be shown by the following flowchart. 

Leave a Reply

Your email address will not be published. Required fields are marked *