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 truethen the statement block will be executed; otherwise it will be skipped to the statement – x. This can be shown by the following flowchart,