Write down about the simple if statement

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





Simple if statement : The general form of a simple if statement is as follows,





if (test expression){
statement-block;
}
statement – x;
Here, the statement block may contain a single statement or a group of statements. If the test expression is true then the statement block will be executed; otherwise it will be skipped to the statement – x. This can be shown by the following flowchart,

Leave a Reply

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