Program of If Else Statement

The if statement is used to execute a single statement or a group of statements when thw condition is true, it does nothing if the condition is false

Syntax

            if(condition)
                    {
                               statement-block;
                    }
             else
                    {
                                statement-block;
                     }

Program


Output


If Statement